
.checkout-page {
width: min(1180px, calc(100% - 40px));
margin: 30px auto 60px;
}


/* PAGE HEADER */

.checkout-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 25px;
margin-bottom: 28px;
}

.checkout-eyebrow {
display: inline-flex;
align-items: center;
gap: 7px;
margin-bottom: 7px;
color: #22a8a8;
font-size: 13px;
font-weight: 700;
}

.checkout-header h2 {
margin: 0;
color: #172b35;
font-size: 28px;
line-height: 1.2;
font-weight: 800;
}

.checkout-header p {
margin: 7px 0 0;
color: #7b8a91;
font-size: 14px;
}

.back-cart {
display: inline-flex;
align-items: center;
gap: 7px;
color: #52636b;
text-decoration: none;
font-size: 14px;
font-weight: 600;
white-space: nowrap;
transition: .2s ease;
}

.back-cart:hover {
color: #22a8a8;
}

/*MAIN GRID */

.checkout-grid {
display: grid;
grid-template-columns: minmax(0, 1.65fr) minmax(340px, .85fr);
gap: 24px;
align-items: start;
}

.checkout-left {
display: flex;
flex-direction: column;
gap: 20px;
}

/* CHECKOUT CARDS */

.checkout-card,
.order-summary {
background: #fff;
border: 1px solid #e8eeee;
border-radius: 16px;
box-shadow: 0 6px 24px rgba(25, 65, 75, .06);
}

.checkout-card {
overflow: hidden;
}

/* CARD HEADER */

.checkout-card-header {
display: flex;
align-items: center;
gap: 13px;
padding: 20px 22px;
border-bottom: 1px solid #edf2f2;
}

.checkout-icon {
width: 42px;
height: 42px;
min-width: 42px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12px;
background: #e9f9f8;
color: #159a9a;
font-size: 19px;
}

.checkout-card-header h3 {
margin: 0;
color: #20343c;
font-size: 17px;
font-weight: 750;
}

.checkout-card-header p {
margin: 3px 0 0;
color: #8a989e;
font-size: 12px;
}

/*FORM*/

.checkout-form {
padding: 22px;
}

.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}

.form-group {
margin-bottom: 18px;
}

.form-group:last-child {
margin-bottom: 0;
}

.form-group.full {
width: 100%;
}

.form-group label {
display: block;
margin-bottom: 7px;
color: #40535b;
font-size: 13px;
font-weight: 700;
}

.form-group label span {
margin-left: 2px;
color: #e05c5c;
}

.form-group label small {
margin-left: 3px;
color: #9aa5a9;
font-size: 11px;
font-weight: 500;
}

/* INPUTS*/
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid #dce5e5;
  border-radius: 10px;
  outline: none;
  background: #fbfdfd;
  color: #30434b;
  font-size: 13px;
  font-family: inherit;
  transition: .2s ease;
}
.form-group input::placeholder { color: #b2babc; }
.form-group input:hover { border-color: #c8d8d8; }
.form-group input:focus {
  border-color: #4bc5c2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(75, 197, 194, .10);
}

/* locked fields (profile address) */
.form-group input[readonly] {
  background: #f1f5f5;
  color: #7b8a91;
  cursor: not-allowed;
}
.form-group input[readonly]:focus {
  border-color: #dce5e5;
  box-shadow: none;
}

/* address mode radios */
.address-mode { display: flex; gap: 12px; flex-wrap: wrap; }
.address-mode label {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dce5e5;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.address-mode label:has(input:checked) {
  border-color: #4bc5c2;
  background: #e9f9f8;
  color: #159a9a;
}
.address-mode input { accent-color: #20aaa8; }

/* error alert */
.alert-danger {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #f5c2c2;
  border-radius: 10px;
  background: #fdecec;
  color: #b94141;
  font-size: 13px;
}

/* ORDER SUMMARY */

.checkout-right {
position: sticky;
top: 20px;
}

.order-summary {
padding: 22px;
}

/* SUMMARY HEADER */

.summary-header {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 18px;
border-bottom: 1px solid #edf2f2;
}

.summary-header span {
display: block;
margin-bottom: 3px;
color: #8b999e;
font-size: 11px;
font-weight: 600;
}

.summary-header h3 {
margin: 0;
color: #20343c;
font-size: 18px;
font-weight: 800;
}

.summary-cart-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 11px;
background: #e9f9f8;
color: #159a9a;
font-size: 18px;
}

/* PRODUCTS */

.summary-products {
max-height: 280px;
overflow-y: auto;
padding: 4px 0;
}

.summary-product {
display: flex;
justify-content: space-between;
gap: 15px;
padding: 14px 0;
border-bottom: 1px solid #f0f3f3;
}

.summary-product:last-child {
border-bottom: 0;
}

.product-info {
min-width: 0;
}

.product-name {
color: #35484f;
font-size: 13px;
font-weight: 650;
line-height: 1.45;
}

.product-qty {
margin-top: 4px;
color: #9aa5a9;
font-size: 11px;
}

.product-price {
color: #293e46;
font-size: 13px;
font-weight: 750;
white-space: nowrap;
}

/* PROMO CODE */

.promo-section {
padding: 17px 0;
border-top: 1px solid #edf2f2;
border-bottom: 1px solid #edf2f2;
}

.promo-section label {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
color: #53656b;
font-size: 12px;
font-weight: 700;
}

.promo-section label i {
color: #22a8a8;
}

.promo-row {
display: flex;
gap: 8px;
}

.promo-row input {
flex: 1;
min-width: 0;
height: 42px;
box-sizing: border-box;
padding: 0 12px;
border: 1px solid #dce5e5;
border-radius: 9px;
outline: none;
background: #fbfdfd;
color: #30434b;
font-size: 12px;
}

.promo-row input:focus {
border-color: #4bc5c2;
box-shadow: 0 0 0 3px rgba(75, 197, 194, .10);
}

.promo-row button {
height: 42px;
padding: 0 16px;
border: 0;
border-radius: 9px;
background: #edf8f7;
color: #168f8e;
font-size: 12px;
font-weight: 750;
cursor: pointer;
transition: .2s ease;
}

.promo-row button:hover {
background: #dff3f2;
}

/* PRICE SUMMARY */

.price-summary {
padding: 16px 0 4px;
}

.summary-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
padding: 7px 0;
color: #78878c;
font-size: 13px;
}

.summary-row strong {
color: #40535b;
font-weight: 650;
white-space: nowrap;
}

.summary-row small {
color: #9ba6aa;
font-size: 11px;
}

/* TOTAL*/

.summary-total {
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
padding: 17px 0 19px;
margin-top: 5px;
border-top: 1px dashed #dce5e5;
}

.summary-total span {
display: block;
color: #30464e;
font-size: 14px;
font-weight: 750;
}

.summary-total small {
display: block;
margin-top: 3px;
color: #9aa6aa;
font-size: 10px;
}

.summary-total .amount {
color: #159b99;
font-size: 22px;
font-weight: 850;
white-space: nowrap;
}

/* CHECKOUT BUTTON */

.checkout-submit {
width: 100%;
min-height: 49px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 0 17px;
border: 0;
border-radius: 11px;
background: #20aaa8;
color: #fff;
font-size: 14px;
font-weight: 750;
cursor: pointer;
box-shadow: 0 6px 15px rgba(32, 170, 168, .18);
transition: .2s ease;
}

.checkout-submit span {
display: flex;
align-items: center;
gap: 8px;
}

.checkout-submit > i {
font-size: 17px;
}

.checkout-submit:hover {
background: #178f8d;
transform: translateY(-1px);
box-shadow: 0 8px 18px rgba(32, 170, 168, .23);
}

.checkout-submit:active {
transform: translateY(0);
}

/* SECURE CHECKOUT */

.secure-checkout {
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
margin-top: 11px;
color: #98a5a8;
font-size: 10px;
text-align: center;
}

.secure-checkout i {
color: #36a9a4;
font-size: 13px;
}

/* TABLET*/

@media (max-width: 900px) {


.checkout-grid {
    grid-template-columns: 1fr;
}

.checkout-right {
    position: static;
}

.order-summary {
    max-width: none;
}


}

/* MOBILE*/

@media (max-width: 600px) {


.checkout-page {
    width: calc(100% - 24px);
    margin: 20px auto 40px;
}


/* Header */

.checkout-header {
    display: block;
    margin-bottom: 20px;
}

.checkout-header h2 {
    font-size: 23px;
}

.checkout-header p {
    font-size: 12px;
    line-height: 1.5;
}

.back-cart {
    margin-top: 13px;
    font-size: 12px;
}


/* Grid */

.checkout-grid {
    gap: 15px;
}

.checkout-left {
    gap: 15px;
}


/* Cards */

.checkout-card,
.order-summary {
    border-radius: 13px;
}

.checkout-card-header {
    padding: 16px;
}

.checkout-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 17px;
}

.checkout-card-header h3 {
    font-size: 15px;
}

.checkout-card-header p {
    font-size: 10px;
}


/* Form */

.checkout-form {
    padding: 16px;
}

.form-row {
    grid-template-columns: 1fr;
    gap: 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-size: 12px;
}

.input-wrapper input {
    height: 44px;
    font-size: 12px;
}


/* Summary */

.order-summary {
    padding: 17px;
}

.summary-header {
    padding-bottom: 14px;
}

.summary-header h3 {
    font-size: 16px;
}

.summary-cart-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.summary-products {
    max-height: none;
}

.summary-product {
    padding: 12px 0;
}

.product-name {
    font-size: 12px;
}

.product-price {
    font-size: 12px;
}


/* Promo */

.promo-section {
    padding: 14px 0;
}

.promo-row input,
.promo-row button {
    height: 40px;
}

.promo-row button {
    padding: 0 14px;
}


/* Total */

.summary-total {
    padding: 15px 0 17px;
}

.summary-total .amount {
    font-size: 19px;
}


/* Button */

.checkout-submit {
    min-height: 48px;
}


}

/* VERY SMALL MOBILE */

@media (max-width: 380px) {


.checkout-page {
    width: calc(100% - 18px);
}

.checkout-header h2 {
    font-size: 21px;
}

.checkout-form,
.order-summary {
    padding: 14px;
}

.summary-total .amount {
    font-size: 17px;
}

}
