/* ============================================================
   Kavira Boutique — Cart page styles
   ============================================================ */

/* ---------- page layout ---------- */
.cart-page {
  min-height: 100vh;
  padding: calc(90px + var(--banner-height, 38px)) 16px 60px;
  background: #FAF8F5;
}

@media (min-width: 860px) {
  .cart-page { padding: calc(120px + var(--banner-height, 38px)) 24px 80px; }
}

.cart-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

@media (min-width: 860px) {
  .cart-container {
    grid-template-columns: 1fr 380px;
    gap: 48px;
  }
}

/* ---------- cart title ---------- */
.cart-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #2c1810;
  margin: 0 0 20px;
}

@media (min-width: 860px) {
  .cart-title { font-size: 2rem; margin-bottom: 28px; }
}

.cart-loading {
  color: #888;
  font-style: italic;
}

.cart-empty-msg {
  text-align: center;
  padding: 60px 0;
  color: #666;
}
.cart-empty-msg svg {
  display: block;
  margin: 0 auto 20px;
  opacity: .3;
}
.cart-empty-msg p { font-size: 1.1rem; }

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #e8e0d5;
  align-items: flex-start;
}
.cart-item:first-child { border-top: 1px solid #e8e0d5; }

.cart-item-img {
  width: 76px;
  height: 92px;
  object-fit: cover;
  border-radius: 6px;
  background: #ede8e1;
  flex-shrink: 0;
}
.cart-item-img-placeholder {
  width: 76px;
  height: 92px;
  border-radius: 6px;
  background: #ede8e1;
  flex-shrink: 0;
}

@media (min-width: 860px) {
  .cart-item { gap: 20px; padding: 20px 0; }
  .cart-item-img,
  .cart-item-img-placeholder { width: 90px; height: 110px; }
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c1810;
  margin: 0 0 4px;
  line-height: 1.3;
}
.cart-item-meta {
  font-size: 0.82rem;
  color: #888;
  margin: 0 0 10px;
  text-transform: capitalize;
}
.cart-item-price {
  font-size: 1rem;
  font-weight: 600;
  color: #4a2c2a;
}

.btn-cart-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  padding: 4px;
  transition: color .2s;
  align-self: flex-start;
  flex-shrink: 0;
}
.btn-cart-remove:hover { color: #c0392b; }

.btn-continue-shopping {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.85rem;
  color: #7a5c3a;
  text-decoration: none;
  letter-spacing: .03em;
}
.btn-continue-shopping:hover { text-decoration: underline; }

/* ---------- sidebar ---------- */
.cart-summary-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 860px) {
  .cart-summary-section {
    position: sticky;
    top: 110px;
    gap: 24px;
  }
}

.cart-auth-panel,
.cart-order-summary {
  background: #fff;
  border: 1px solid #e8e0d5;
  border-radius: 10px;
  padding: 18px 16px;
}

@media (min-width: 860px) {
  .cart-auth-panel,
  .cart-order-summary { padding: 24px 28px; }
}

.cart-auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #2c1810;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

@media (min-width: 860px) {
  .cart-auth-title { font-size: 1.2rem; margin-bottom: 20px; }
}

/* ---------- auth form ---------- */
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
}
.form-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e0d8cf;
  border-radius: 7px;
  font-family: 'Lato', sans-serif;
  font-size: 0.92rem;
  color: #2c1810;
  background: #FAFAF8;
  transition: border-color .2s;
  box-sizing: border-box;
}
.form-group input:focus {
  outline: none;
  border-color: #c9a96e;
  background: #fff;
}

.auth-phone-row,
.auth-otp-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.auth-phone-row input,
.auth-otp-row input { flex: 1; min-width: 0; }

.btn-send-otp,
.btn-verify-otp {
  padding: 9px 14px;
  background: #c9a96e;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: 'Lato', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background .2s;
  flex-shrink: 0;
}
.btn-send-otp:hover,
.btn-verify-otp:hover { background: #b8934a; }
.btn-send-otp:disabled { background: #ddd; color: #999; cursor: not-allowed; }

.btn-auth-link {
  background: none;
  border: none;
  color: #c9a96e;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: 'Lato', sans-serif;
  margin-top: 6px;
  display: inline-block;
}

.auth-welcome {
  font-size: 0.95rem;
  color: #4a2c2a;
  margin: 0 0 10px;
  font-weight: 600;
}

.auth-msg {
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 4px;
}
.auth-msg.success { background: #f0faf0; color: #2e7d32; }
.auth-msg.error   { background: #fdf0f0; color: #c62828; }
.auth-msg.info    { background: #f5f0e8; color: #7a5c3a; }

/* ---------- order summary ---------- */
.summary-rows {
  border-top: 1px solid #ede8e1;
  padding-top: 10px;
  margin-bottom: 10px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}
.summary-row-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
  font-weight: 700;
  color: #2c1810;
  border-top: 1.5px solid #2c1810;
  padding-top: 10px;
  margin-bottom: 16px;
}
.summary-total-amount {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}

.btn-checkout {
  width: 100%;
  padding: 13px;
  background: #2c1810;
  color: #f5e6c8;
  border: none;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-checkout:hover  { background: #4a2c2a; }
.btn-checkout:active { transform: scale(.99); }
.btn-checkout:disabled { background: #ccc; cursor: not-allowed; }

.cart-secure-note {
  font-size: 0.72rem;
  color: #aaa;
  text-align: center;
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
