/* ============================================================
   BUYER.CSS — Device Resale Portal
   Buyer-specific page styles (shop, cart, checkout, orders etc.)
   ============================================================ */

/* ════════════════════════════════════════
   SHOP PAGE
   ════════════════════════════════════════ */

.shop-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

/* Filters sidebar */
.filters-panel {
  position: sticky;
  top: 0;
}

.filter-block {
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.filter-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  cursor: pointer;
}
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  width: 15px; height: 15px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.filter-option label {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--ink);
  cursor: pointer;
  flex: 1;
}
.filter-option .filter-count {
  font-size: 0.7rem;
  color: var(--ink-muted);
  font-family: 'DM Mono', monospace;
}

.filter-clear {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 8px;
}
.filter-clear:hover { opacity: 0.7; }

.price-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.price-range-inputs input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  background: var(--white);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.price-range-inputs input:focus { border-color: var(--gold); }

/* Grade badge pills */
.grade-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.grade-pill {
  padding: 4px 12px;
  border-radius: 100px;
  border: 1.5px solid var(--border-med);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  background: none;
}
.grade-pill:hover,
.grade-pill.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-bg);
}

/* Shop toolbar */
.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.shop-results {
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.shop-results strong { color: var(--ink); }

.sort-select {
  margin-left: auto;
  height: 36px;
  padding: 0 32px 0 12px;
  background: var(--white);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s;
}
.sort-select:focus { border-color: var(--gold); }

.view-toggle {
  display: flex;
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.view-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.view-btn svg {
  width: 15px; height: 15px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.view-btn.active { background: var(--ink); }
.view-btn.active svg { stroke: var(--white); }
.view-btn:not(.active):hover { background: var(--cream); }

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card-image {
  aspect-ratio: 4/3;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-card-image .no-image svg {
  width: 40px; height: 40px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.4;
}
.product-card-grade {
  position: absolute;
  top: 10px; left: 10px;
}

.product-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}
.product-card-desc {
  font-size: 0.76rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-card-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
}
.product-card-price .per {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: var(--ink-muted);
  font-weight: 300;
}
.product-card-stock {
  font-size: 0.7rem;
  color: var(--ink-muted);
}
.product-card-stock.low { color: var(--amber); }
.product-card-stock.out { color: var(--red); }

.btn-add-cart {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.btn-add-cart:hover { background: var(--gold); transform: scale(1.05); }
.btn-add-cart svg {
  width: 15px; height: 15px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Product List View */
.products-list { display: flex; flex-direction: column; gap: 10px; }

.product-list-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.product-list-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-med);
}
.product-list-thumb {
  width: 60px; height: 60px;
  border-radius: var(--r-sm);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.product-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-list-thumb svg {
  width: 24px; height: 24px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 1;
  opacity: 0.4;
}
.product-list-info { flex: 1; min-width: 0; }
.product-list-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
}
.product-list-desc {
  font-size: 0.76rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.product-list-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-med);
  background: var(--white);
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.page-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}
.empty-state-icon {
  width: 64px; height: 64px;
  background: var(--cream-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.empty-state-icon svg {
  width: 28px; height: 28px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-state h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.83rem;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 20px;
}

/* ════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ════════════════════════════════════════ */

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  align-items: start;
}

.product-images {}
.product-main-image {
  aspect-ratio: 4/3;
  background: var(--cream);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}
.product-main-image img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.product-main-image .no-image svg {
  width: 80px; height: 80px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 0.8;
  opacity: 0.3;
}
.product-thumbs {
  display: flex;
  gap: 8px;
}
.product-thumb {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  border: 2px solid var(--border);
  background: var(--cream);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.product-thumb.active { border-color: var(--gold); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info {}
.product-info-breadcrumb {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-info-breadcrumb a { color: var(--gold); }
.product-info-breadcrumb span { color: var(--border-med); }

.product-info h1 {
  font-size: 1.75rem;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.2;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.product-price-block {
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.product-price-main {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.product-price-per {
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.product-stock-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.stock-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.stock-dot.low { background: var(--amber); }
.stock-dot.out { background: var(--red); }

.product-description {
  font-size: 0.87rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 24px;
}

.qty-add-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.qty-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  overflow: hidden;
  height: 48px;
}
.qty-btn {
  width: 40px; height: 100%;
  background: var(--cream);
  border: none;
  font-size: 1.1rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--cream-dark); color: var(--ink); }
.qty-input {
  width: 60px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  font-family: 'DM Mono', monospace;
  color: var(--ink);
  outline: none;
  background: var(--white);
}

.btn-add-to-cart-full {
  flex: 1;
  height: 48px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-add-to-cart-full:hover {
  background: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-add-to-cart-full svg {
  width: 16px; height: 16px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-detail-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.product-details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}
.product-detail-row .detail-key { color: var(--ink-muted); }
.product-detail-row .detail-val { color: var(--ink); font-weight: 500; }

/* ════════════════════════════════════════
   CART PAGE
   ════════════════════════════════════════ */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-item-thumb {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  background: var(--cream);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-thumb svg {
  width: 28px; height: 28px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 1;
  opacity: 0.4;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.cart-item-sub { font-size: 0.76rem; color: var(--ink-muted); }

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.cart-item-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--ink);
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-remove {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 0.75rem;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-remove:hover { color: var(--red); }
.cart-remove svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* Order Summary card */
.order-summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: sticky;
  top: 16px;
}
.order-summary-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.order-summary-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--ink);
}
.order-summary-body { padding: 20px; }
.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.summary-line:last-child { margin-bottom: 0; }
.summary-line.total {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 14px;
}
.summary-line .mono { font-family: 'DM Mono', monospace; font-size: 0.85rem; }
.order-summary-footer {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ════════════════════════════════════════
   CHECKOUT PAGE
   ════════════════════════════════════════ */

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.checkout-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.checkout-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.checkout-step.active { color: var(--ink); }
.checkout-step.done   { color: var(--green); }
.checkout-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 600;
  flex-shrink: 0;
}
.checkout-step.done .checkout-step-num {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.checkout-step.active .checkout-step-num {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.checkout-step-line {
  flex: 1;
  height: 1px;
  background: var(--border-med);
  margin: 0 10px;
  min-width: 32px;
}

.checkout-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.checkout-section-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checkout-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--ink);
}
.checkout-section-body { padding: 20px; }

/* Address selector */
.address-options { display: flex; flex-direction: column; gap: 10px; }
.address-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.address-option:hover { border-color: var(--gold); background: var(--gold-bg); }
.address-option.selected { border-color: var(--gold); background: var(--gold-bg); }
.address-option input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.address-option-info {}
.address-option-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
}
.address-option-detail {
  font-size: 0.76rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Payment method tabs */
.payment-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.payment-tab {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s;
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.payment-tab:hover { border-color: var(--gold); }
.payment-tab.active { border-color: var(--gold); background: var(--gold-bg); }
.payment-tab svg {
  width: 20px; height: 20px;
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.payment-tab.active svg { stroke: var(--gold); }
.payment-tab-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}
.payment-tab-sub {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* Stripe elements placeholder */
.stripe-element-wrap {
  background: var(--white);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  min-height: 44px;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
}
.stripe-element-wrap.focused { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,151,74,0.12); }

.stripe-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.stripe-lock {
  width: 14px; height: 14px;
  stroke: var(--green);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bank-transfer-info {
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 18px 20px;
  border: 1px solid var(--border);
}
.bank-transfer-info p {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 14px;
}
.bank-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.bank-detail-row:last-child { border-bottom: none; }
.bank-detail-row .bk-label { color: var(--ink-muted); }
.bank-detail-row .bk-val { font-family: 'DM Mono', monospace; font-weight: 400; color: var(--ink); }

/* ════════════════════════════════════════
   ADDRESSES PAGE
   ════════════════════════════════════════ */

.addresses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.address-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.address-card:hover { box-shadow: var(--shadow-sm); }
.address-card.default { border-color: var(--gold); }

.address-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.address-card-detail {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 16px;
}
.address-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-address-card {
  background: transparent;
  border: 1.5px dashed var(--border-med);
  border-radius: var(--r-lg);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 180px;
}
.add-address-card:hover { border-color: var(--gold); background: var(--gold-bg); }
.add-address-card svg {
  width: 28px; height: 28px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.add-address-card span {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.add-address-card:hover svg,
.add-address-card:hover span { color: var(--gold); stroke: var(--gold); }

/* Address modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12,15,14,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s var(--ease);
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--ink);
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--cream);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-close svg {
  width: 14px; height: 14px;
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.modal-close:hover { background: var(--cream-dark); }

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════
   ORDERS PAGE
   ════════════════════════════════════════ */

.orders-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.status-filter-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border-med);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.status-filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.status-filter-btn.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.orders-list { display: flex; flex-direction: column; gap: 12px; }

.order-row {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
}
.order-row:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-med);
}

.order-row-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.order-row-icon svg {
  width: 18px; height: 18px;
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.order-row-info { flex: 1; min-width: 0; }
.order-row-ref {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  margin-bottom: 3px;
}
.order-row-items {
  font-size: 0.76rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-row-meta { text-align: right; flex-shrink: 0; }
.order-row-total {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.order-row-date {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.order-row-chevron {
  width: 16px; height: 16px;
  stroke: var(--ink-muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   ORDER DETAIL PAGE
   ════════════════════════════════════════ */

.order-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.order-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px;
}
.timeline-step {
  display: flex;
  gap: 14px;
  padding-bottom: 24px;
  position: relative;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::before {
  content: '';
  position: absolute;
  left: 13px; top: 28px;
  width: 1px;
  bottom: 0;
  background: var(--border-med);
}
.timeline-step:last-child::before { display: none; }

.timeline-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-med);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.timeline-dot.done {
  background: var(--green);
  border-color: var(--green);
}
.timeline-dot.active {
  background: var(--ink);
  border-color: var(--ink);
}
.timeline-dot svg {
  width: 12px; height: 12px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-info { padding-top: 3px; }
.timeline-label {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.timeline-label.muted { color: var(--ink-muted); }
.timeline-date {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* Order items table override for detail */
.order-items-table td:first-child { font-weight: 500; }

/* Tracking banner */
.tracking-banner {
  background: var(--blue-bg);
  border: 1px solid rgba(79,142,255,0.2);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tracking-banner svg {
  width: 20px; height: 20px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.tracking-banner-info { flex: 1; }
.tracking-banner-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.tracking-banner-number {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink);
}

/* ════════════════════════════════════════
   ACCOUNT SETTINGS
   ════════════════════════════════════════ */

.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}

.settings-nav {
  position: sticky;
  top: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: var(--cream); color: var(--ink); }
.settings-nav-item.active { background: var(--gold-bg); color: var(--gold); font-weight: 500; }
.settings-nav-item svg {
  width: 15px; height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.settings-section:last-child { margin-bottom: 0; }
.settings-section-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.settings-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--ink);
}
.settings-section-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-top: 3px;
}
.settings-section-body { padding: 24px; }

.danger-zone {
  border-color: rgba(240,78,78,0.25);
}
.danger-zone .settings-section-header {
  background: var(--red-bg);
  border-bottom-color: rgba(240,78,78,0.15);
}
.danger-zone .settings-section-title { color: var(--red); }

/* ════════════════════════════════════════
   NOTIFICATIONS PAGE
   ════════════════════════════════════════ */

.notif-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.notif-list { display: flex; flex-direction: column; gap: 0; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: none;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.notif-item:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.notif-item:last-child  { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--r-md) var(--r-md); }
.notif-item:only-child  { border-radius: var(--r-md); border-bottom: 1px solid var(--border); }
.notif-item:hover { background: var(--cream); }
.notif-item.unread { background: rgba(184,151,74,0.04); }
.notif-unread-dot {
  position: absolute;
  left: 8px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.notif-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon svg {
  width: 16px; height: 16px;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-body { flex: 1; }
.notif-title {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
}
.notif-text {
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.notif-time {
  font-size: 0.7rem;
  color: var(--ink-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

@media (max-width: 1100px) {
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-info { max-width: 560px; }
}

@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters-panel {
    position: static;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    display: none;
  }
  .filters-panel.open { display: block; }
  .cart-layout,
  .checkout-layout,
  .order-detail-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
}

@media (max-width: 600px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .addresses-grid { grid-template-columns: 1fr; }
  .cart-item { flex-wrap: wrap; }
  .cart-item-controls { width: 100%; flex-direction: row; align-items: center; }
  .payment-tabs { flex-direction: column; }
}
