/* hosting/pages/checkout/checkout.css */

.checkout-page{
  padding:16px;
  padding-bottom:120px;
}

/* Title */

.checkout-title{
  margin-bottom:16px;
  font-size:20px;
  font-weight:600;
}

/* Sections */

.checkout-section{
  background:#fff;
  border-radius:12px;
  padding:16px;
  margin-bottom:16px;
}

/* Items */

.checkout-items{
  margin-top:10px;
}

.checkout-item{
  display:flex;
  gap:12px;
  margin-bottom:14px;
}

.checkout-item-img{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:8px;
}

.checkout-item-info{
  flex:1;
}

.checkout-item-title{
  font-weight:600;
  margin-bottom:4px;
}

.checkout-item-variant{
  font-size:13px;
  color:#777;
}

.checkout-item-price{
  font-size:14px;
  margin-top:4px;
}

.checkout-item-line-total{
  font-size:14px;
  font-weight:600;
}

/* Address */

.checkout-address{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.checkout-address input{
  height:40px;
  padding:0 12px;
  border-radius:8px;
  border:1px solid #ddd;
  font-size:14px;
}

/* Summary */

.checkout-summary{
  margin-top:10px;
}

.summary-row{
  display:flex;
  justify-content:space-between;
  margin-top:10px;
}

.summary-row.discount{
  color:#d33;
}

.summary-row.total{
  font-weight:600;
  font-size:16px;
  margin-top:12px;
}

/* Place order button */

.place-order-btn{
  margin-top:16px;
  width:100%;
  height:48px;
  background:#000;
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
}


/* Order items header */

.checkout-items-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

/* Edit cart button */

.edit-cart-btn{
  font-size:13px;
  padding:6px 10px;
  border-radius:6px;
  border:1px solid #ddd;
  background:#fff;
  cursor:pointer;
  color:#333;
}

.edit-cart-btn:hover{
  background:#f5f5f5;
}

.edit-cart-btn{
  background:none;
  border:none;
  color:#10457d;
  font-size:13px;
  cursor:pointer;
}

.pincode-input{
  display:flex;
  gap:8px;
  margin-bottom:12px;
}

.pincode-input input{
  flex:1;
  padding:10px;
  border:1px solid #ddd;
  border-radius:8px;
}

.pincode-input button{
  padding:10px 14px;
  border:none;
  background:#000;
  color:#fff;
  border-radius:8px;
  cursor:pointer;
}

.delivery-location{
  margin-bottom:12px;
}

.delivery-pin{
  font-weight:600;
}

.delivery-city{
  color:#666;
  font-size:14px;
}

.checkout-address input[readonly]{
  background:#f6f6f6;
  color:#555;
}

#shipping-cost {
  font-weight: 600;
}

#shipping-cost.free {
  color: #1a7f37;
}

.checkout-logout {
  margin-left: auto;
  font-size: 13px;
  color: #e53935;
  cursor: pointer;
  text-decoration: none;
}

.checkout-logout:hover {
  text-decoration: underline;
}






.phone-field {
  margin-bottom: 16px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
  display: block;
}

.phone-input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border 0.2s ease;
}

.phone-input-group:focus-within {
  border-color: #0EA5A4;
}

.country-code {
  border: none;
  background: #f7f7f7;
  padding: 10px;
  font-size: 14px;
  outline: none;
}

.phone-input {
  flex: 1;
  border: none;
  padding: 12px;
  font-size: 15px;
  outline: none;
}

.field-error {
  font-size: 12px;
  color: #e11d48;
  margin-top: 4px;
}

.google-login-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.google-login-btn:hover {
  background: #f5f5f5;
}


.otp-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}






.phone-login-block {
  margin-top: 12px;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;

  background: var(--color-surface);
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;

  padding: 8px 10px;

  transition: all 0.2s ease;
}

.phone-row:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(24,160,160,0.15); /* fallback glow */
}

.country-code {
  border: none;
  background: #f1f5f9;

  padding: 15px 8px;
  border-radius: 8px;

  font-size: 14px;
  font-weight: 500;

  outline: none;
  cursor: pointer;
}


#phone-input {
  flex: 1;
  border: none;
  outline: none;

  font-size: 16px;
  font-weight: 500;

  color: var(--color-text);
}

#phone-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}


#send-otp {
  border: none;

  background: var(--color-primary);
  color: #fff;

  padding: 10px 14px;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;
}

#send-otp:disabled {
  background: #cbd5f5;
  cursor: not-allowed;
}
/* #send-otp:disabled {
  background: #cbd5f5;
  color: #fff;
  cursor: not-allowed;
}

#send-otp:hover:not(:disabled) {
  background: #0284c7;
}

#send-otp:active:not(:disabled) {
  transform: scale(0.96);
}

#send-otp {
  min-width: 96px;
  text-align: center;
} */



.otp-verify {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

#otp-input {
  flex: 1;

  height: 44px;
  padding: 0 12px;

  border-radius: 12px;
  border: 1.5px solid #e2e8f0;

  font-size: 15px;
  font-weight: 500;

  color: var(--color-text);
  background: var(--color-surface);

  outline: none;
  transition: all 0.2s ease;
}


#otp-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(24,160,160,0.15);
}


#otp-input::placeholder {
  color: var(--color-muted);
}

#verify-otp {
  min-width: 90px;
  height: 44px;

  border: none;
  border-radius: 12px;

  background: var(--color-primary);
  color: #fff;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition: all 0.2s ease;
}

#verify-otp:disabled {
  background: #cbd5f5;
  cursor: not-allowed;
}

#verify-otp:hover:not(:disabled) {
  filter: brightness(0.9);
}

#verify-otp:active:not(:disabled) {
  transform: scale(0.96);
}

.phone-login-block {
  display: flex;
  flex-direction: column;
}

#send-otp.verified {
  background: var(--color-discount);
  color: #fff;
}

#verify-otp.verified {
  background: var(--color-discount);
  color: #fff;
}

.checkout-section {
  animation: fadeSlide 0.3s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

.otp-success {
  padding: 10px;
  border-radius: 12px;
  background: rgba(16,185,129,0.1);
  color: var(--color-discount);
  font-weight: 600;
  text-align: center;
}


.delivery-error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  font-size: 14px;
}

.address-warning {
  background: #fff3cd;
  color: #856404;
  padding: 8px;
  margin-top: 8px;
  border-radius: 6px;
  font-size: 13px;
}

.address-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}




/* =========================
   SAVED ADDRESS CARD (PREMIUM)
========================= */

.saved-address-card {
  background: linear-gradient(180deg, #ffffff, #fafafa);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.06);

  box-shadow: 
    0 4px 12px rgba(0,0,0,0.04),
    0 1px 2px rgba(0,0,0,0.06);

  transition: all 0.25s ease;
  position: relative;
}

.saved-address-card:hover {
  box-shadow: 
    0 8px 20px rgba(0,0,0,0.06),
    0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.saved-address-card strong {
  font-size: 15px;
  color: var(--color-text);
}

.saved-address-card div {
  font-size: 13.5px;
  color: var(--color-muted);
  line-height: 1.4;
  margin-top: 2px;
}


/* =========================
   ADDRESS WARNING (IMPROVED)
========================= */

.address-warning {
  background: rgba(255, 193, 7, 0.12);
  color: #8a6d3b;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  margin-top: 10px;
  border: 1px solid rgba(255, 193, 7, 0.25);
}


/* =========================
   ADDRESS ACTIONS (BUTTON WRAPPER)
========================= */

.address-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}


/* =========================
   PRIMARY BUTTON (USE ADDRESS)
========================= */

#use-saved-address {
  flex: 1;

  height: 44px;
  border-radius: 12px;
  border: none;

  background: var(--color-primary);
  color: #fff;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

#use-saved-address:hover {
  filter: brightness(0.95);
}

#use-saved-address:active {
  transform: scale(0.96);
}


/* =========================
   SECONDARY BUTTON (CHANGE)
========================= */

#change-address-btn {
  flex: 1;

  height: 44px;
  border-radius: 12px;

  border: 1.5px solid var(--color-primary);
  background: transparent;

  color: var(--color-primary);

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;
}

#change-address-btn:hover {
  background: rgba(0,0,0,0.03);
}

#change-address-btn:active {
  transform: scale(0.96);
}


/* =========================
   SINGLE CHANGE BUTTON (NO MISMATCH CASE)
========================= */

.saved-address-card > #change-address-btn {
  margin-top: 14px;
  width: 100%;
}


/* =========================
   SUBTLE TOP ACCENT (DB STYLE)
========================= */

.saved-address-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;

  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );
}


/* =========================
   MOBILE TOUCH IMPROVEMENT
========================= */

#use-saved-address,
#change-address-btn {
  -webkit-tap-highlight-color: transparent;
}


.checkout-section h3,
.checkout-section h2 {
  margin-bottom: 14px; /* 🔥 adds breathing space */
}

.address-warning {
  margin-top: 12px;
  margin-bottom: 12px; /* 🔥 NEW spacing */
}


/* =========================
   PAYMENT SECTION (FIXED)
========================= */

.payment-method-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

/* Each option (label becomes card) */
.payment-method-section label {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 14px;
  border-radius: 14px;

  border: 1.5px solid #e5e7eb;
  background: #fff;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover effect */
.payment-method-section label:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Radio button */
.payment-method-section input[type="radio"] {
  accent-color: var(--color-primary);
  transform: scale(1.2);
}



/* Highlight selected card */
.payment-method-section label:has(input:checked) {
  border-color: var(--color-primary);
  background: rgba(0,0,0,0.02);
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.payment-method-section input[type="radio"]:checked {
  border-color: var(--color-primary);
}

/* Text */
.payment-method-section label {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
}

.place-order-btn {
  background: var(--color-primary); /* 🔥 DB driven */
  color: #fff;
}

.place-order-btn:hover {
  filter: brightness(0.95);
}

.place-order-btn:active {
  transform: scale(0.98);
}



.checkout-section {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 18px;

  border: 1px solid rgba(0,0,0,0.05);

  box-shadow:
    0 6px 18px rgba(0,0,0,0.04),
    0 1px 2px rgba(0,0,0,0.06);

  margin-bottom: 18px;
}


.checkout-item {
  display: flex;
  gap: 14px;
  align-items: center;

  padding: 10px;
  border-radius: 12px;

  background: rgba(0,0,0,0.02);
}

.checkout-item-img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.checkout-item-title {
  font-size: 15px;
  font-weight: 600;
}

.checkout-item-variant {
  font-size: 12px;
  color: var(--color-muted);
}

.checkout-item-line-total {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-price);
}


.checkout-summary {
  margin-top: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--color-muted);
}

.summary-row.discount {
  color: var(--color-discount);
  font-weight: 500;
}

.summary-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0,0,0,0.1);

  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
}







/* =========================
   DESKTOP CONTAINER WIDTH
========================= */

@media (min-width: 1024px) {

  .checkout-page {
    max-width: 1000px;   /* 🔥 control full page width */
    margin: 0 auto;      /* center horizontally */
    padding: 32px 24px;
  }

}