/* ═══════════════════════════════════════════════
   cart.css — Səbət, İstək siyahısı, Sifariş təsdiqi
   (cart.php, wishlist.php, order-confirm.php)
═══════════════════════════════════════════════ */

/* ─── PAGE HEADER ─────────────────────────────────────────────── */
.page-header {
  max-width: 1400px; margin: 0 auto; padding: 0 40px 36px;
  border-bottom: 1px solid var(--warm);
  display: flex; align-items: flex-end; justify-content: space-between;
}
.page-title { font-family: var(--serif); font-size: clamp(30px, 3vw, 44px); font-weight: 300; color: var(--espresso); }
.page-title em { font-style: italic; }
.page-meta { font-size: 13px; color: var(--stone); letter-spacing: .04em; }
.page-subtitle { font-size: 13px; color: var(--stone); margin-top: 8px; line-height: 1.6; }

/* ─── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 120px 20px; text-align: center;
}
.empty-icon { width: 72px; height: 72px; margin-bottom: 32px; color: var(--sand); }
.empty-heart { width: 80px; height: 80px; margin-bottom: 32px; color: var(--sand); }
.empty-title {
  font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); font-weight: 300;
  color: var(--espresso); margin-bottom: 16px; line-height: 1.2;
}
.empty-title em { font-style: italic; }
.empty-desc { font-size: 14px; color: var(--stone); line-height: 1.8; max-width: 400px; margin-bottom: 40px; font-weight: 300; }

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block; background: var(--espresso); color: var(--cream);
  padding: 14px 40px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500; border-radius: 2px; transition: opacity .2s;
  font-family: var(--sans); border: none; cursor: pointer;
}
.btn-primary:hover { opacity: .8; }
.btn-outline {
  display: inline-block; border: 1px solid var(--sand); color: var(--bark);
  padding: 12px 32px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  font-family: var(--sans); border-radius: 2px; transition: border-color .2s, color .2s;
}
.btn-outline:hover { border-color: var(--espresso); color: var(--espresso); }

/* ─── CART WRAP ───────────────────────────────────────────────── */
.cart-wrap { max-width: 1400px; margin: 0 auto; padding: 48px 40px 100px; }
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }

/* ─── CART ITEMS HEADER ───────────────────────────────────────── */
.section-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); }
.cart-items-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--warm);
}
.btn-clear-cart {
  background: none; border: none; cursor: pointer; font-family: var(--sans);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone);
  text-decoration: underline; text-underline-offset: 3px; transition: color .2s;
}
.btn-clear-cart:hover { color: var(--espresso); }

/* ─── CART ITEM ───────────────────────────────────────────────── */
.cart-item {
  display: grid; grid-template-columns: 108px 1fr; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--warm);
  transition: opacity .3s, transform .3s;
}
.cart-item-img { width: 108px; aspect-ratio: 3/4; overflow: hidden; border-radius: 3px; background: var(--warm); display: block; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.cart-item-img:hover img { opacity: .85; }
.cart-item-name-link { text-decoration: none; }
.cart-item-name-link:hover .cart-item-name { text-decoration: underline; text-underline-offset: 3px; }
.cart-item-body { display: flex; flex-direction: column; gap: 10px; }
.cart-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cart-item-name { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--espresso); line-height: 1.2; margin-bottom: 3px; }
.cart-item-desc { font-size: 12px; color: var(--stone); line-height: 1.5; }

.btn-item-remove {
  width: 28px; height: 28px; background: none; border: 1px solid var(--sand);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; transition: border-color .2s;
}
.btn-item-remove:hover { border-color: var(--espresso); }
.btn-item-remove svg { width: 11px; height: 11px; stroke: var(--bark); fill: none; stroke-width: 2; stroke-linecap: round; }

.cart-item-middle { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.size-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.size-btn {
  font-size: 11px; font-family: var(--sans); letter-spacing: .06em;
  border: 1px solid var(--sand); background: transparent; color: var(--stone);
  padding: 4px 10px; border-radius: 2px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.size-btn.active { border-color: var(--espresso); color: var(--espresso); font-weight: 500; }
.size-btn:hover:not(.active) { border-color: var(--bark); }

.qty-control { display: flex; align-items: center; border: 1px solid var(--sand); border-radius: 2px; overflow: hidden; }
.qty-btn {
  width: 32px; height: 32px; background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--bark); display: flex; align-items: center;
  justify-content: center; transition: background .2s; line-height: 1;
}
.qty-btn:hover { background: var(--warm); }
.qty-btn:disabled { opacity: .3; cursor: not-allowed; }
.qty-num {
  width: 36px; text-align: center; font-size: 13px; font-weight: 500;
  border-left: 1px solid var(--sand); border-right: 1px solid var(--sand);
  height: 32px; display: flex; align-items: center; justify-content: center;
}

.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.cart-item-price { font-size: 14px; font-weight: 500; letter-spacing: .02em; }
.cart-item-price s { color: var(--sand); font-weight: 300; font-size: 12px; margin-right: 5px; }
.cart-item-line-total { font-size: 12px; color: var(--stone); }

/* ─── RIGHT COLUMN ────────────────────────────────────────────── */
.cart-right { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 0; }

/* ─── ORDER SUMMARY ───────────────────────────────────────────── */
.order-summary { background: var(--warm); border-radius: 4px 4px 0 0; padding: 28px 28px 24px; }
.summary-title { font-family: var(--serif); font-size: 22px; font-weight: 400; margin-bottom: 24px; }
.summary-title em { font-style: italic; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--bark); margin-bottom: 12px; }
.summary-divider { height: 1px; background: var(--sand); margin: 18px 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; }
.summary-total-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.summary-total-price { font-family: var(--serif); font-size: 30px; font-weight: 400; }

/* ─── CHECKOUT FORM ───────────────────────────────────────────── */
.checkout-form { background: var(--warm); border-top: 1px solid var(--sand); padding: 24px 28px 28px; border-radius: 0 0 4px 4px; }
.form-section-title { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); margin-bottom: 14px; font-weight: 500; }
.shipping-options, .payment-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.radio-option {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--sand); border-radius: 3px;
  transition: border-color .2s, background .2s; background: var(--cream);
}
.radio-option:hover { border-color: var(--bark); }
.radio-option.selected { border-color: var(--espresso); background: #fff; }
.radio-option input[type="radio"] { display: none; }
.radio-dot {
  width: 16px; height: 16px; border: 1.5px solid var(--sand); border-radius: 50%;
  flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.radio-option.selected .radio-dot { border-color: var(--espresso); }
.radio-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--espresso); display: none; }
.radio-option.selected .radio-dot::after { display: block; }
.radio-text { flex: 1; min-width: 0; }
.radio-label { font-size: 12px; color: var(--espresso); font-weight: 500; letter-spacing: .02em; }
.radio-desc { font-size: 11px; color: var(--stone); margin-top: 2px; line-height: 1.4; }
.radio-price { font-size: 12px; font-weight: 500; color: var(--espresso); flex-shrink: 0; margin-top: 1px; }

.form-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-wrap { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); }
.field-input {
  border: 1px solid var(--sand); border-radius: 2px; padding: 10px 12px;
  font-family: var(--sans); font-size: 13px; color: var(--espresso); outline: none;
  transition: border-color .2s; background: var(--cream); width: 100%;
}
.field-input:focus { border-color: var(--bark); }
.field-input.error { border-color: #b04040; }
.field-error { font-size: 10px; color: #b04040; display: none; }
.field-input.error ~ .field-error { display: block; }

.btn-checkout {
  width: 100%; background: var(--espresso); color: var(--cream);
  border: none; font-family: var(--sans); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; padding: 16px; border-radius: 2px; cursor: pointer;
  transition: opacity .2s; font-weight: 500; margin-bottom: 12px;
}
.btn-checkout:hover { opacity: .8; }

/* ─── SUGGESTION STRIP ────────────────────────────────────────── */
.suggestion-strip { background: var(--warm); padding: 60px 0; }
.suggestion-inner { max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.suggestion-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 40px; }
.suggestion-title { font-family: var(--serif); font-size: clamp(26px, 2.5vw, 36px); font-weight: 400; }
.suggestion-title em { font-style: italic; }
.suggestion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ─── PRODUCT CARDS in cart/wishlist ──────────────────────────── */
.product-card { position: relative; }
.product-img-wrap {
  position: relative; overflow: hidden; background: var(--warm);
  aspect-ratio: 3/4; border-radius: 3px; margin-bottom: 20px;
}
.product-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}
.product-card:hover .product-img-wrap img { transform: scale(1.04); }
.product-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--espresso); color: var(--cream);
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 1px; z-index: 2;
}
.product-badge.sale { background: #b04040; }
.product-name { font-family: var(--serif); font-size: 17px; font-weight: 400; color: var(--espresso); margin-bottom: 4px; line-height: 1.3; }
.product-desc { font-size: 12px; color: var(--stone); margin-bottom: 12px; line-height: 1.5; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.product-price { font-size: 14px; font-weight: 500; color: var(--bark); }
.product-price s { color: var(--sand); font-weight: 300; margin-right: 4px; }
.btn-add-cart {
  background: var(--espresso); color: var(--cream); border: none;
  font-family: var(--sans); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; padding: 9px 14px; border-radius: 2px;
  cursor: pointer; transition: opacity .2s; white-space: nowrap;
}
.btn-add-cart:hover { opacity: .75; }

/* ─── WISHLIST SPECIFIC ───────────────────────────────────────── */
.wishlist-wrap { max-width: 1400px; margin: 0 auto; padding: 48px 40px 100px; }
.wishlist-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px; padding-bottom: 20px; border-bottom: 1px solid var(--warm);
}
.wishlist-count { font-size: 13px; color: var(--stone); letter-spacing: .04em; }
.btn-clear-all {
  background: none; border: none; cursor: pointer; font-family: var(--sans);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--stone);
  transition: color .2s; text-decoration: underline; text-underline-offset: 3px;
}
.btn-clear-all:hover { color: var(--espresso); }
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.wishlist-footer-bar {
  margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--warm);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.wishlist-footer-bar p { font-size: 13px; color: var(--stone); }
.btn-remove {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 32px; height: 32px; background: rgba(255,255,255,.9); border: none;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .2s, transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.btn-remove:hover { background: #fff; transform: scale(1.08); }
.btn-remove svg { width: 13px; height: 13px; stroke: var(--bark); fill: none; stroke-width: 1.8; }
.product-ml { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.ml-btn {
  font-size: 11px; font-family: var(--sans); letter-spacing: .08em;
  border: 1px solid var(--sand); background: transparent; color: var(--stone);
  padding: 4px 10px; border-radius: 2px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.ml-btn.active { background: #fff; color: #000; border-color: #000; }
.ml-btn:hover { border-color: #000; }

/* ─── ORDER CONFIRM SPECIFIC ──────────────────────────────────── */
.confirm-wrap { max-width: 1400px; margin: 0 auto; padding: 48px 40px 100px; }
.confirm-layout { display: grid; grid-template-columns: 1fr 360px; gap: 56px; align-items: start; }
.confirm-section { margin-bottom: 40px; }
.confirm-section:last-child { margin-bottom: 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px solid var(--warm); margin-bottom: 24px;
}
.section-title { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--espresso); font-weight: 500; }
.btn-edit {
  background: none; border: none; cursor: pointer; font-family: var(--sans);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone);
  text-decoration: underline; text-underline-offset: 3px; transition: color .2s;
}
.btn-edit:hover { color: var(--espresso); }
.confirm-item { display: grid; grid-template-columns: 80px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--warm); }
.confirm-item:last-child { border-bottom: none; }
.confirm-item-img { width: 80px; aspect-ratio: 3/4; border-radius: 3px; overflow: hidden; background: var(--warm); }
.confirm-item-img img { width: 100%; height: 100%; object-fit: cover; }
.confirm-item-body { display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.confirm-item-name { font-family: var(--serif); font-size: 18px; font-weight: 400; line-height: 1.2; }
.confirm-item-meta { font-size: 12px; color: var(--stone); }
.confirm-item-price { font-size: 13px; font-weight: 500; margin-top: 4px; }
.confirm-item-price s { color: var(--sand); font-weight: 300; font-size: 12px; margin-right: 4px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin-bottom: 5px; }
.info-value { font-size: 13px; color: var(--espresso); font-weight: 400; line-height: 1.5; }
.info-block.full { grid-column: 1 / -1; }
.method-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--warm); border-radius: 3px; margin-bottom: 10px; }
.method-row:last-child { margin-bottom: 0; }
.method-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--espresso); flex-shrink: 0; }
.method-name { font-size: 13px; font-weight: 500; flex: 1; }
.method-price { font-size: 13px; color: var(--bark); }
.order-panel { position: sticky; top: 92px; background: var(--warm); border-radius: 4px; padding: 32px 28px; }
.panel-title { font-family: var(--serif); font-size: 22px; font-weight: 400; margin-bottom: 24px; }
.panel-title em { font-style: italic; }
.panel-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--bark); margin-bottom: 12px; }
.panel-divider { height: 1px; background: var(--sand); margin: 18px 0; }
.panel-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.panel-total-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.panel-total-price { font-family: var(--serif); font-size: 32px; font-weight: 400; }
.btn-confirm {
  width: 100%; background: var(--espresso); color: var(--cream); border: none;
  font-family: var(--sans); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  padding: 16px; border-radius: 2px; cursor: pointer; transition: opacity .2s; font-weight: 500;
}
.btn-confirm:hover { opacity: .8; }
.panel-note { margin-top: 16px; font-size: 11px; color: var(--stone); line-height: 1.7; text-align: center; }
.redirect-state, .success-state {
  display: none; flex-direction: column; align-items: center;
  justify-content: center; padding: 100px 20px; text-align: center;
}
.redirect-title, .success-title { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); font-weight: 300; margin-bottom: 14px; }
.redirect-title em, .success-title em { font-style: italic; }
.redirect-desc, .success-desc { font-size: 14px; color: var(--stone); line-height: 1.8; max-width: 440px; margin-bottom: 32px; font-weight: 300; }
.btn-back {
  display: inline-block; background: var(--espresso); color: var(--cream);
  padding: 13px 36px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  border-radius: 2px; font-family: var(--sans); transition: opacity .2s;
}
.btn-back:hover { opacity: .8; }
.success-icon {
  width: 64px; height: 64px; background: var(--espresso); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 28px;
}
.success-icon svg { width: 28px; height: 28px; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1200px) { .products-grid { grid-template-columns: repeat(3, 1fr); } .suggestion-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) {
  .cart-layout { grid-template-columns: 1fr 340px; gap: 36px; }
  .suggestion-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .suggestion-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-right { position: static; }
  .confirm-layout { grid-template-columns: 1fr; }
  .order-panel { position: static; }
}
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .cart-wrap { padding: 32px 20px 80px; }
  .wishlist-wrap { padding: 32px 20px 80px; }
  .confirm-wrap { padding: 32px 20px 80px; }
  .breadcrumb, .page-header { padding-left: 20px; padding-right: 20px; }
  .suggestion-inner { padding: 0 20px; }
}
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } .suggestion-grid { grid-template-columns: 1fr; } }
@media (max-width: 500px) { .products-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .cart-item { grid-template-columns: 80px 1fr; gap: 14px; }
  .cart-item-img { width: 80px; }
  .info-grid { grid-template-columns: 1fr; }
}
