/* ==========================================================
   PAGES.CSS — Shared page styles for ShopTransmission
   Covers: Shop, Cart, Checkout, Account, Track Order,
           Terms, Privacy, Flyout Cart
   ========================================================== */

/* ========== BREADCRUMBS ========== */
.breadcrumbs {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: .85rem;
  color: var(--text-muted);
}
.breadcrumbs .container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs a {
  color: var(--text-light);
  transition: color var(--transition);
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }
.breadcrumbs span { user-select: none; }
.breadcrumb-sep { color: var(--text-muted); font-size: .9rem; }

/* ========== PAGE TITLE ========== */
.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 28px;
  letter-spacing: -.5px;
}

/* ========== FORMS (shared) ========== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group .req { color: var(--accent); }
.form-group .optional { color: var(--text-muted); font-weight: 400; font-size: .8rem; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; }
.form-group select {
  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'%3E%3Cpath fill='%23999' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.form-row { display: flex; gap: 16px; }
.form-row-half > * { flex: 1; }

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  cursor: pointer;
  line-height: 1.4;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin-top: 1px;
  flex-shrink: 0;
}
.checkbox-label a { color: var(--accent); text-decoration: underline; }

/* ========== SHOP PAGE ========== */
/* Category Slider */
.category-slider-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.category-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.category-slider::-webkit-scrollbar { height: 4px; }
.category-slider::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.category-slide {
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  text-align: center;
  min-width: 140px;
  cursor: pointer;
  transition: all var(--transition);
}
.category-slide:hover, .category-slide.active {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.category-slide.active { color: var(--accent); }
.category-slide-icon { margin-bottom: 6px; }
.category-slide-icon svg { width: 28px; height: 28px; fill: var(--accent); margin: 0 auto; display: block; }
.category-slide span { font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* Shop Section & Layout */
.shop-section { padding: 32px 0 64px; }
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* Sidebar Filter */
.shop-sidebar {
  position: sticky;
  top: 80px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.sidebar-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.sidebar-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}
.filter-group {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.filter-group:last-of-type { border-bottom: none; }
.filter-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.filter-options { }
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  cursor: pointer;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.3;
}
.filter-checkbox:hover { color: var(--text); }
.filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.filter-count {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text-muted);
}
.filter-select {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--text);
  background: var(--white);
  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'%3E%3Cpath fill='%23999' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: var(--accent); }
.filter-stars .stars {
  color: #f59e0b;
  font-size: .95rem;
  letter-spacing: 1px;
}
.filter-apply-btn {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background var(--transition);
}
.filter-apply-btn:hover { background: var(--accent-hover); }
.filter-clear-btn {
  width: 100%;
  padding: 10px;
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-clear-btn:hover { border-color: var(--text-muted); color: var(--text); }

/* Price Range */
.price-range {
  padding: 4px 0;
}
.price-range input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin: 8px 0;
}
.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-muted);
}

/* Filter buttons */
.filter-actions {
  display: flex;
  gap: 8px;
}
.filter-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: .82rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-actions .btn-filter-apply {
  background: var(--accent);
  color: var(--white);
}
.filter-actions .btn-filter-apply:hover { background: var(--accent-hover); }
.filter-actions .btn-filter-clear {
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
}
.filter-actions .btn-filter-clear:hover { border-color: var(--text-muted); }

/* Rating filter */
.rating-stars { display: flex; gap: 2px; }
.rating-stars svg { width: 14px; height: 14px; }
.rating-stars svg.filled { fill: #f59e0b; }
.rating-stars svg.empty { fill: var(--border); }

/* Shop Toolbar */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.results-count {
  font-size: .88rem;
  color: var(--text-light);
}
.results-count strong { color: var(--text); }
.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
}
.filter-toggle-btn svg { fill: var(--white); }
.sort-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-dropdown label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-light);
  white-space: nowrap;
}
.sort-dropdown select {
  padding: 8px 32px 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--text);
  background: var(--white);
  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'%3E%3Cpath fill='%23999' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  outline: none;
}
.sort-dropdown select:focus { border-color: var(--accent); }

.view-toggle { display: flex; gap: 4px; }
.view-toggle button {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.view-toggle button:hover { border-color: var(--text-muted); }
.view-toggle .view-btn.active { border-color: var(--accent); background: rgba(46,134,193,.05); }
.view-toggle button svg, .view-toggle .view-btn svg { width: 16px; height: 16px; fill: var(--text-muted); }
.view-toggle .view-btn.active svg { fill: var(--accent); }

/* Shop Product Grid — 3 col */
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.shop-product-grid.list-view {
  grid-template-columns: 1fr;
}
.shop-product-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 200px 1fr;
}
.shop-product-grid.list-view .product-image {
  padding-top: 0;
  min-height: 180px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-light);
  transition: all var(--transition);
  gap: 6px;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-num.active,
.pagination .active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  font-weight: 700;
}
.pagination .page-dots,
.pagination .dots {
  border: none;
  background: none;
  color: var(--text-muted);
  min-width: 30px;
}
.pagination .page-btn {
  font-weight: 600;
}
.pagination .page-btn.disabled {
  opacity: .4;
  pointer-events: none;
}
.pagination .page-btn svg { fill: currentColor; }

/* Mobile filter toggle */
.mobile-filter-btn {
  display: none;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  gap: 6px;
  align-items: center;
}
.mobile-filter-btn svg { width: 18px; height: 18px; fill: var(--white); }

/* ========== CART PAGE ========== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.cart-table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th {
  background: var(--bg);
  padding: 12px 16px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-light);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.cart-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: .9rem;
}
.cart-table tr:last-child td { border-bottom: none; }

.cart-product {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cart-product-img {
  width: 64px;
  height: 64px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cart-product-img svg { width: 32px; height: 32px; fill: #ccc; }
.cart-product-name {
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}
.cart-product-name a { transition: color var(--transition); }
.cart-product-name a:hover { color: var(--accent); }
.cart-product-compat {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-qty-input {
  width: 64px;
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  outline: none;
}
.cart-qty-input:focus { border-color: var(--accent); }

.cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 50%;
  transition: all var(--transition);
  line-height: 1;
}
.cart-remove-btn:hover { color: var(--accent); background: rgba(46,134,193,.08); }

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.coupon-form {
  display: flex;
  gap: 8px;
}
.coupon-form input {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  outline: none;
  min-width: 180px;
}
.coupon-form input:focus { border-color: var(--accent); }
.coupon-form button {
  padding: 8px 18px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.coupon-form button:hover { background: var(--primary-light); }

.btn-update-cart {
  padding: 8px 20px;
  background: var(--bg);
  color: var(--text-light);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-update-cart:hover { border-color: var(--text-muted); color: var(--text); }

/* Cart Totals Sidebar */
.cart-totals {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.cart-totals h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary);
}
.cart-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.cart-totals-row:last-of-type { border-bottom: none; }
.cart-totals-row span:first-child { color: var(--text-light); }
.cart-totals-row span:last-child { font-weight: 600; }
.cart-totals-row.total {
  font-size: 1.1rem;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 2px solid var(--primary);
  border-bottom: none;
}
.cart-totals-row.total span:last-child {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.2rem;
}

.shipping-options {
  padding: 8px 0 0;
}
.shipping-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  margin-bottom: 6px;
  cursor: pointer;
}
.shipping-options input[type="radio"] {
  accent-color: var(--accent);
}

.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  margin-top: 20px;
  transition: background var(--transition);
}
.btn-checkout:hover { background: var(--accent-hover); }

/* ========== CHECKOUT PAGE ========== */
.checkout-notice {
  background: rgba(46,134,193,.06);
  border: 1px solid rgba(46,134,193,.15);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: .88rem;
  margin-bottom: 28px;
}
.checkout-notice a { color: var(--accent); font-weight: 600; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: start;
}
.checkout-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* Order Summary Card */
.order-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.order-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.order-table th {
  text-align: left;
  padding: 10px 0;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.order-table th:last-child { text-align: right; }
.order-table td {
  padding: 10px 0;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
.order-table td:last-child { text-align: right; font-weight: 500; }
.order-table .qty-mark { color: var(--text-muted); font-weight: 400; }
.order-table tfoot td { font-weight: 600; }
.order-table .free-shipping { color: #10b981; font-weight: 600; }
.order-total-row td {
  border-top: 2px solid var(--primary);
  border-bottom: none;
  padding-top: 14px;
  font-size: 1rem;
}
.order-total-amount {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--primary);
}

/* Payment Methods */
.payment-methods {
  margin-bottom: 20px;
}
.payment-methods h3 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}
.payment-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color var(--transition);
}
.payment-option.active { border-color: var(--accent); }
.payment-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.payment-radio input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.payment-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 600;
}
.payment-details {
  padding: 0 14px 14px;
}
.payment-note {
  font-size: .85rem;
  color: var(--text-light);
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius);
}

/* Terms checkbox */
.checkout-terms {
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius);
}

/* Place order button */
.btn-place-order {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

/* Trust badges */
.checkout-trust {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.checkout-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ========== ACCOUNT PAGE ========== */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

/* Account Sidebar */
.account-nav {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.account-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
.account-nav a:last-child { border-bottom: none; }
.account-nav a:hover { background: var(--bg); color: var(--text); }
.account-nav a.active {
  background: rgba(46,134,193,.05);
  color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent);
}
.account-nav a svg { width: 18px; height: 18px; fill: currentColor; }
.account-nav a.logout { color: var(--accent); }

/* Dashboard cards */
.dashboard-welcome {
  font-size: 1rem;
  margin-bottom: 24px;
  color: var(--text-light);
}
.dashboard-welcome strong { color: var(--primary); }
.dashboard-welcome a { color: var(--accent); }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.dashboard-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.dashboard-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.dashboard-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(46,134,193,.1), rgba(46,134,193,.04));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.dashboard-card-icon svg { width: 22px; height: 22px; fill: var(--accent); }
.dashboard-card h4 { font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.dashboard-card span { font-size: .78rem; color: var(--text-muted); }

/* Orders table */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.orders-table th {
  background: var(--bg);
  padding: 12px 16px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-light);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.orders-table td {
  padding: 14px 16px;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
.orders-table tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.status-badge.processing { background: #fef3c7; color: #92400e; }
.status-badge.completed { background: #d1fae5; color: #065f46; }
.status-badge.shipped { background: #dbeafe; color: #1e40af; }
.status-badge.cancelled { background: #fee2e2; color: #991b1b; }

.btn-view {
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-view:hover { border-color: var(--accent); color: var(--accent); }

/* Address cards */
.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.address-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.address-card h4 {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}
.address-card p {
  font-size: .85rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 14px;
}
.address-card .btn-edit {
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}
.address-card .btn-edit:hover { border-color: var(--accent); color: var(--accent); }

/* Login / Register */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.auth-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary);
}
.auth-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 12px;
  border-radius: var(--radius);
  margin-top: 8px;
}
.auth-card .forgot-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: .85rem;
  color: var(--accent);
}

/* ========== FLYOUT CART ========== */
.flyout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.45);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
}
.flyout-overlay.open {
  opacity: 1;
  visibility: visible;
}

.flyout-cart {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: var(--white);
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  transition: right .35s cubic-bezier(.4, 0, .2, 1);
}
.flyout-cart.open { right: 0; }

.flyout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.flyout-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.flyout-count { color: var(--text-muted); font-weight: 400; font-size: .88rem; }
.flyout-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  transition: color var(--transition);
}
.flyout-close:hover { color: var(--accent); }

.flyout-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.flyout-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.flyout-item:last-child { border-bottom: none; }

.flyout-item-img {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.flyout-item-info { flex: 1; min-width: 0; }
.flyout-item-info h4 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2px;
  line-height: 1.3;
}
.flyout-item-info p {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.flyout-item-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.flyout-item-price {
  font-size: .88rem;
  font-weight: 700;
  color: var(--primary);
}
.flyout-item-qty {
  font-size: .78rem;
  color: var(--text-muted);
}
.flyout-item-remove {
  position: absolute;
  top: 14px;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 2px;
  transition: color var(--transition);
}
.flyout-item-remove:hover { color: var(--accent); }

.flyout-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.flyout-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: .95rem;
}
.flyout-subtotal strong {
  font-size: 1.1rem;
  color: var(--primary);
}
.flyout-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: .9rem;
}
.flyout-btn:last-child { margin-bottom: 0; }

/* ========== LEGAL PAGES (Terms, Privacy) ========== */
.legal-content {
  max-width: 800px;
  margin: 30px auto 60px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
}
.legal-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}
.legal-content .content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.legal-content .last-updated {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.legal-content .btn-print {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}
.legal-content .btn-print:hover { border-color: var(--accent); color: var(--accent); }

/* Table of contents */
.legal-toc {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.legal-toc h3 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 10px;
  color: var(--text-light);
}
.legal-toc ol {
  list-style: decimal;
  padding-left: 18px;
}
.legal-toc li {
  margin-bottom: 6px;
  font-size: .88rem;
}
.legal-toc a { color: var(--accent); transition: color var(--transition); }
.legal-toc a:hover { color: var(--accent-hover); }

.legal-section {
  margin-bottom: 28px;
}
.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.legal-section p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 8px;
}
.legal-section ul {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0;
}
.legal-section ul li {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 4px;
}

/* ========== TRACK ORDER PAGE ========== */
.track-order-form {
  max-width: 500px;
  margin: 0 auto 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.track-order-form h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}
.track-order-form p {
  font-size: .88rem;
  color: var(--text-light);
  margin-bottom: 24px;
}
.track-order-form .form-group { text-align: left; }
.track-order-form .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 12px;
  border-radius: var(--radius);
  margin-top: 8px;
}

/* Tracking result */
.tracking-result {
  max-width: 700px;
  margin: 0 auto;
}
.tracking-header {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.tracking-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.tracking-status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.tracking-status.in-transit { background: #dbeafe; color: #1e40af; }
.tracking-status.delivered { background: #d1fae5; color: #065f46; }
.tracking-est {
  font-size: .88rem;
  color: var(--text-light);
}

/* Progress tracker */
.tracking-progress {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin-bottom: 24px;
}
.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 10px;
}
.progress-steps::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--border);
  z-index: 0;
}
.progress-line {
  position: absolute;
  top: 18px;
  left: 40px;
  height: 3px;
  background: #10b981;
  z-index: 1;
  transition: width .5s ease;
}
.progress-step {
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: .85rem;
  font-weight: 700;
  border: 3px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: all var(--transition);
}
.progress-step.completed .step-circle {
  background: #10b981;
  border-color: #10b981;
  color: var(--white);
}
.progress-step.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(46,134,193,.2);
  animation: pulse-ring 2s ease infinite;
}
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 4px rgba(46,134,193,.2); }
  50% { box-shadow: 0 0 0 8px rgba(46,134,193,.08); }
}
.step-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 2px;
}
.step-date {
  font-size: .72rem;
  color: var(--text-muted);
}
.progress-step.completed .step-label { color: #065f46; }
.progress-step.active .step-label { color: var(--accent); font-weight: 700; }

/* Shipping details */
.shipping-details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.shipping-details h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}
.shipping-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.shipping-detail-item label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.shipping-detail-item span {
  font-size: .9rem;
  font-weight: 500;
}
.shipping-detail-item a {
  color: var(--accent);
  font-weight: 600;
}

/* Help box */
.help-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
}
.help-box h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.help-box p {
  font-size: .85rem;
  color: var(--text-light);
}
.help-box a { color: var(--accent); font-weight: 600; }

/* ========== RESPONSIVE — ALL PAGES ========== */
@media (max-width: 1024px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-product-grid { grid-template-columns: repeat(3, 1fr); }
  .account-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .shop-product-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-layout { grid-template-columns: 1fr; }
  .form-row-half { flex-direction: column; gap: 0; }
  .shipping-detail-grid { grid-template-columns: 1fr; }
  .legal-content { padding: 24px; }

  .filter-toggle-btn { display: inline-flex; }
  .sidebar-close { display: block; }
  .shop-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    z-index: 200;
    background: var(--white);
    overflow-y: auto;
    padding: 20px;
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
    border-radius: 0;
  }
  .shop-sidebar.open { display: block; }

  .cart-table th:nth-child(2),
  .cart-table td:nth-child(2) { display: none; }

  .progress-steps { flex-direction: column; gap: 20px; align-items: flex-start; padding: 0; }
  .progress-steps::before { display: none; }
  .progress-line { display: none; }
  .progress-step { display: flex; align-items: center; gap: 14px; text-align: left; }
  .step-circle { margin: 0; flex-shrink: 0; }

  .coupon-form { flex-direction: column; }
  .coupon-form input { min-width: 0; }
}

@media (max-width: 480px) {
  .shop-product-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .tracking-header { flex-direction: column; align-items: flex-start; }
}

@media print {
  .top-bar, .header, .main-nav, .footer, .breadcrumbs,
  .btn-print, .flyout-cart, .flyout-overlay { display: none !important; }
  .legal-content { border: none; padding: 0; box-shadow: none; }
}
