/* ==========================================================================
   GawangPinas Buyer Marketplace (shop.gawangpinas.com)
   Design System & Styling Rules
   ========================================================================== */

/* ---------- Fonts & Icons ---------- */
@font-face {
  font-family: 'Helvetica Neue';
  src: url('../assets/fonts/HelveticaNeueRoman.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: url('../assets/fonts/HelveticaNeueMedium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: url('../assets/fonts/HelveticaNeueBold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Material Symbols Outlined';
  src: url('../assets/fonts/MaterialSymbolsOutlined.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga' 1;
  -webkit-font-feature-settings: 'liga' 1;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Brand Colors */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-deep: #1e3a8a;
  --primary-soft: #eff6ff;

  /* Neutrals */
  --navy: #0f172a;
  --slate: #1e293b;
  --body: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;

  /* Accents */
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --green: #059669;
  --green-soft: #d1fae5;
  --red: #e11d48;
  --red-soft: #ffe4e6;

  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;

  /* Typography */
  --font-main: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Metrics & Motion */
  --container: 1240px;
  --header-h: 76px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --t: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base & Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  background-color: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t);
}
a:hover {
  color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.25;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: min(var(--container), 100% - 32px);
  margin-inline: auto;
}

/* ---------- Global B2B Header & Navigation ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;

}

.logo-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Wide Search Bar */
.search-container {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: var(--r-full);
  padding: 4px 6px 4px 16px;
  transition: all var(--t);
}

.search-form:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--navy);
}

.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  padding: 8px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--t);
  flex-shrink: 0;
}

.search-btn:hover {
  background: var(--primary-dark);
}

/* Auto-complete Dropdown */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 120;
  overflow: hidden;
}

.search-suggestions.active {
  display: block;
}

.suggestion-group-title {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  background: var(--bg-soft);
}

.suggestion-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--slate);
  transition: background var(--t);
}

.suggestion-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Nav Actions Right */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--slate);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: all var(--t);
  position: relative;
}

.nav-link-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-full);
  line-height: 1;
}

/* User Menu */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: var(--r-full);
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  transition: all var(--t);
}

.user-menu-btn:hover {
  border-color: var(--primary);
  background: #fff;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

/* Sub-nav Category Strip */
.subnav {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.subnav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0;
}

.subnav-inner::-webkit-scrollbar {
  display: none;
}

.subnav-item {
  color: var(--slate);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  transition: all var(--t);
}

.subnav-item:hover, .subnav-item.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

/* ---------- B2B Marketplace Hero Banner ---------- */
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 44px 44px 48px;
  border-radius: var(--r-lg);
  margin: 24px 0 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #60a5fa;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 15px;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-val {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-lbl {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.3;
}

/* ---------- Grid Layouts & Cards ---------- */
.section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.section-desc {
  font-size: 14px;
  color: var(--body);
  margin-top: 4px;
}

.view-all-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Categories Grid Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  text-align: center;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-icon-box {
  width: 52px;
  height: 52px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.category-card-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
}

.category-card-count {
  font-size: 12px;
  color: var(--muted);
}

/* Product Grid System (4 cols desktop, 2-3 tablet, 1-2 mobile) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Product Card B2B */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--t);
  position: relative;
}

.product-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: var(--bg-soft);
  overflow: hidden;
}

.product-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-img {
  transform: scale(1.05);
}

.verified-badge-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t);
}

.fav-btn:hover, .fav-btn.active {
  color: var(--red);
  background: #fff;
}

.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-supplier-name {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-unit-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.product-unit {
  font-size: 13px;
  color: var(--body);
}

.moq-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: auto;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}

.moq-tag {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-sm);
}

.location-tag {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 2px;
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 16px;
}

/* ---------- Buttons & UI Components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--slate);
  border-color: var(--line);
}
.btn-secondary:hover {
  background: var(--line-soft);
  border-color: var(--muted);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-soft);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--r-md);
}

.btn-block {
  width: 100%;
}

/* Verified Supplier Card */
.supplier-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--t);
}

.supplier-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.supplier-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.supplier-logo {
  width: 50px;
  height: 50px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
}

.supplier-info {
  display: flex;
  flex-direction: column;
}

.supplier-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}

.supplier-type {
  font-size: 13px;
  color: var(--muted);
}

.supplier-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--bg-soft);
  padding: 12px;
  border-radius: var(--r-sm);
  text-align: center;
}

.meta-box-val {
  font-weight: 800;
  color: var(--navy);
  font-size: 14px;
}
.meta-box-lbl {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Products Search & Filter Page ---------- */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  margin: 32px 0 64px;
}

@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
}

/* Filter Sidebar Panel */
.filter-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  height: fit-content;
}

.filter-group {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--slate);
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
}

/* Results Top Controls */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: #fff;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.results-count {
  font-size: 14px;
  color: var(--slate);
  font-weight: 600;
}

.sort-select {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

/* ---------- Product Detail Experience ---------- */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  margin: 32px 0;
}

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

.gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
}

.thumb-item {
  width: 70px;
  height: 70px;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
}

.thumb-item.active {
  border-color: var(--primary);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pricing Tier Table */
.tier-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}

.tier-table th, .tier-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}

.tier-table th {
  background: var(--line-soft);
  color: var(--navy);
  font-weight: 700;
}

.tier-table tr:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.tier-highlight {
  color: var(--green);
  font-weight: 700;
}

/* Quantity Input Controller */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-soft);
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.qty-btn:hover {
  background: var(--line);
}

.qty-input {
  width: 60px;
  height: 36px;
  border: none;
  text-align: center;
  font-weight: 700;
  color: var(--navy);
  outline: none;
}

.moq-warning-text {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Shopping Cart & Checkout ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  margin: 32px 0 64px;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.cart-supplier-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.cart-supplier-header {
  padding: 14px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.cart-item-row:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: var(--r-sm);
  object-fit: cover;
}

.cart-summary-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.summary-total {
  border-top: 2px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

/* ---------- Buyer Account Portal ---------- */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  margin: 32px 0 64px;
}

@media (max-width: 900px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
}

.account-sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--slate);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t);
  margin-bottom: 4px;
}

.account-menu-item:hover, .account-menu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.account-content-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-badge.confirmed, .status-badge.open {
  background: var(--primary-soft);
  color: var(--primary);
}

.status-badge.shipped, .status-badge.delivered {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t);
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fff;
  border-radius: var(--r-lg);
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  transform: translateY(20px);
  transition: transform var(--t);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------- Mobile Bottom Navigation Bar ---------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08);
  z-index: 99;
  padding: 6px 0;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--slate);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
}

.mobile-nav-item.active {
  color: var(--primary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}
