/* ========== Root & Variables ========== */
:root {
  --primary: #6C63FF;
  --secondary: #4ECDC4;
  --accent: #FF6B9D;
  --dark: #2D2E5F;
  --light: #F7F8FA;
  --text-dark: #1A202C;
  --text-light: #718096;
  --border: #E2E8F0;
  --success: #48BB78;
  --warning: #ED8936;
  --danger: #F56565;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
body.dark-mode {
  --light: #1A202C;
  --text-dark: #F7F8FA;
  --text-light: #CBD5E0;
  --border: #4A5568;
}

/* ========== Global Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--light);
  color: var(--text-dark);
  transition: var(--transition);
}

/* ========== Typography ========== */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

p {
  line-height: 1.6;
  color: var(--text-light);
}

/* ========== Container ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== Header & Navigation ========== */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: white;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  font-size: 2rem;
}

/* Navigation Menu */
nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
}

nav a:hover {
  opacity: 0.8;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Top Bar Info */
.header-top {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  font-size: 0.9rem;
  text-align: right;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vip-badge {
  background: rgba(255, 215, 0, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
}

/* ========== Buttons ========== */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: 'Sarabun', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

.announcement-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #fff3cd, #ffe8a1);
  color: #5a4c1c;
  border: 1px solid #f2df8f;
  border-radius: 20px;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
  box-shadow: 0 12px 30px rgba(255, 231, 143, 0.25);
}

.announcement-banner p {
  margin: 0;
  font-weight: 600;
}

.announcement-banner .announcement-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.95rem;
  color: #8a6d0b;
}

.announcement-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.announcement-popup.active {
  display: flex;
}

.announcement-popup .popup-card {
  background: white;
  width: min(560px, 100%);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.announcement-popup .popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.announcement-popup h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.promo-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 40px rgba(51, 65, 85, 0.08);
  text-align: left;
}

.promo-card h3 {
  margin-bottom: 0.75rem;
}

.promo-card p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.coupon-card {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  background: #f5f7ff;
  border: 1px dashed #c3d4ff;
  margin-bottom: 1rem;
}

.coupon-card strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.coupon-card span {
  color: var(--primary);
  font-weight: 700;
}

/* ========== Cards ========== */
.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-body {
  margin: 1rem 0;
}

.card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Glass Morphism Card */
.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== Product Grid ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-8px);
}

.product-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: var(--light);
  position: relative;
}

.product-image:hover {
  filter: brightness(0.9);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.product-info {
  padding: 1.5rem;
}

.product-subject {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--text-dark);
  line-height: 1.4;
}

.product-grade {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.stars {
  color: #FFC107;
}

.rating-count {
  color: var(--text-light);
  font-size: 0.9rem;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0 0.5rem;
}

.product-price-old {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.product-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.product-footer .btn {
  flex: 1;
}

/* ========== Forms ========== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Sarabun', sans-serif;
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========== Cart ========== */
.cart-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  margin: 2rem 0;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  margin-bottom: 1rem;
}

.cart-item-image {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-grade {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
}

.cart-item-quantity input {
  width: 50px;
  padding: 0.25rem 0.5rem;
}

.cart-summary {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.summary-row.total {
  border: none;
  padding-bottom: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.summary-row.total .label {
  color: var(--primary);
}

.summary-row.total .value {
  color: var(--primary);
}

/* ========== Checkout ========== */
.checkout-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.checkout-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary);
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.payment-option {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.payment-option:hover {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.05);
}

.payment-option.selected {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.1);
}

.payment-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ========== Modal ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

/* ========== VIP Plans ========== */
.vip-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.plan-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  border: 2px solid var(--border);
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}

.plan-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(78, 205, 196, 0.05));
  transform: scale(1.05);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.plan-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1rem 0;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0;
}

.plan-price small {
  font-size: 0.5em;
  color: var(--text-light);
}

.plan-discount {
  background: rgba(78, 205, 196, 0.1);
  color: var(--secondary);
  padding: 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.plan-benefits {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.plan-benefits li {
  padding: 0.5rem 0;
  color: var(--text-light);
}

.plan-benefits li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ========== Dashboard ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.order-list {
  margin: 2rem 0;
}

.order-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.order-item:hover {
  box-shadow: var(--shadow);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.order-id {
  font-weight: 700;
  color: var(--primary);
}

.order-status {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-completed {
  background: rgba(72, 187, 120, 0.1);
  color: var(--success);
}

.status-approved {
  background: rgba(72, 187, 120, 0.1);
  color: var(--success);
}

.status-pending {
  background: rgba(237, 137, 54, 0.1);
  color: var(--warning);
}

.status-awaiting_payment,
.status-pending_approval {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

.status-cancelled {
  background: rgba(245, 101, 101, 0.1);
  color: var(--danger);
}

/* ========== Footer ========== */
footer {
  background: var(--dark);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* ========== Alerts ========== */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alert-success {
  background: rgba(72, 187, 120, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: rgba(237, 137, 54, 0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background: rgba(245, 101, 101, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-info {
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary);
  border-left: 4px solid var(--primary);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .header-content {
    gap: 1rem;
  }

  nav {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .cart-container,
  .checkout-container {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .vip-plans {
    grid-template-columns: 1fr;
  }

  .plan-card.featured {
    transform: scale(1);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }

  .product-card {
    margin: 0 auto;
  }

  .top-bar-content {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .product-info {
    padding: 1rem;
  }

  .product-title {
    font-size: 0.95rem;
  }

  nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Storefront Refresh ========== */
:root {
  --primary: #2563eb;
  --secondary: #0f766e;
  --accent: #f59e0b;
  --dark: #172033;
  --light: #f6f7fb;
  --surface: #ffffff;
  --text-dark: #172033;
  --text-light: #667085;
  --border: #dbe3ef;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
  --shadow-lg: 0 24px 48px rgba(23, 32, 51, 0.14);
}

body {
  background:
    linear-gradient(180deg, rgba(246, 247, 251, 0.2), var(--light) 420px),
    var(--light);
  line-height: 1.55;
}

header {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
  backdrop-filter: blur(12px);
}

.header-top {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
}

.top-link {
  color: #fde68a;
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 700;
}

.logo {
  color: var(--text-dark);
  min-width: max-content;
}

.logo:hover {
  transform: none;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 0.9rem;
  letter-spacing: 0;
}

nav {
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  color: var(--text-dark);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

nav a:hover,
nav a[aria-current="page"] {
  background: #edf4ff;
  color: var(--primary);
  opacity: 1;
}

nav a::after {
  display: none;
}

.cart-count-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  margin-left: 0.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 8px;
  min-height: 2.75rem;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  box-shadow: none;
}

.btn-primary:hover {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.btn-secondary {
  background: var(--secondary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-outline {
  border-color: var(--border);
  color: var(--text-dark);
  background: white;
}

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

.store-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #fff7ed 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 2rem;
  align-items: stretch;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4.25rem);
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin: 1rem 0 1.5rem;
  color: var(--text-light);
  font-size: 1.08rem;
}

.hero-search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
  width: min(100%, 680px);
  padding: 0.4rem 0.5rem 0.4rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-search span {
  color: var(--primary);
  font-weight: 700;
}

.hero-search input {
  border: none;
  box-shadow: none;
  padding: 0.85rem 0.75rem;
  background: transparent;
}

.hero-search input:focus {
  box-shadow: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
  width: min(100%, 680px);
}

.hero-stats div,
.hero-preview,
.filter-panel,
.empty-state {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.hero-stats div {
  padding: 1rem;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  color: var(--text-dark);
  font-size: 1.25rem;
}

.hero-stats span {
  color: var(--text-light);
  font-size: 0.92rem;
}

.hero-preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.preview-header,
.preview-stack div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.preview-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.preview-header span,
.preview-stack span {
  color: var(--text-light);
}

.preview-header strong {
  color: var(--primary);
}

.preview-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.preview-stack div {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.preview-stack strong {
  text-align: right;
}

.filter-section {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(120px, 0.65fr);
  gap: 1rem;
  padding: 1rem;
}

.filter-panel .form-group {
  margin-bottom: 0;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
}

.catalog-section {
  padding: 2.5rem 0;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.catalog-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.active-filters span,
.result-count {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.result-count {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.06);
  cursor: default;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.product-cover {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  overflow: hidden;
}

.product-card:nth-child(6n+2) .product-cover {
  background: linear-gradient(135deg, #fef3c7, #dbeafe);
}

.product-card:nth-child(6n+3) .product-cover {
  background: linear-gradient(135deg, #dcfce7, #fef3c7);
}

.product-card:nth-child(6n+4) .product-cover {
  background: linear-gradient(135deg, #fee2e2, #e0f2fe);
}

.product-card:nth-child(6n+5) .product-cover {
  background: linear-gradient(135deg, #ede9fe, #dcfce7);
}

.product-card:nth-child(6n+6) .product-cover {
  background: linear-gradient(135deg, #ffedd5, #e0e7ff);
}

.worksheet-sheet {
  width: 54%;
  max-width: 128px;
  aspect-ratio: 0.72;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 36px rgba(23, 32, 51, 0.18);
  transform: rotate(-3deg);
}

.worksheet-sheet span {
  height: 0.55rem;
  border-radius: 999px;
  background: #dbe3ef;
}

.worksheet-sheet span:nth-child(2) {
  width: 72%;
}

.worksheet-sheet span:nth-child(3) {
  width: 48%;
}

.worksheet-sheet strong {
  margin-top: auto;
  color: var(--primary);
  font-size: 1.35rem;
}

.cover-subject {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  max-width: calc(100% - 1.7rem);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.35rem 0.75rem;
  color: var(--text-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.product-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-subject {
  color: var(--secondary);
  text-transform: none;
  letter-spacing: 0;
}

.product-grade {
  margin: 0;
  border-radius: 999px;
  background: var(--light);
  color: var(--text-light);
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
}

.product-title {
  min-height: 3.1rem;
  margin: 0.55rem 0 0.4rem;
}

.product-description {
  margin: 0;
  font-size: 0.92rem;
}

.product-rating {
  margin-top: 0.85rem;
}

.stars {
  color: #f59e0b;
  letter-spacing: 0;
}

.product-footer {
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
}

.product-price {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  font-size: 1.35rem;
}

.product-price-old {
  margin: 0;
}

.product-footer .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state-icon {
  color: var(--primary);
  font-weight: 700;
}

.promo-section {
  padding: 2.5rem 0 3rem;
}

.promo-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 1.25rem;
  align-items: stretch;
  border-radius: 8px;
  background: linear-gradient(135deg, #172033, #0f766e);
  padding: 1.25rem;
}

.promo-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  color: white;
}

.promo-copy h2 {
  margin: 0 0 0.75rem;
}

.promo-copy p {
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.84);
}

.promo-card,
.coupon-card,
.card,
.cart-item,
.cart-summary,
.checkout-section,
.plan-card,
.order-item {
  border-radius: 8px;
}

.promo-card {
  padding: 1.1rem;
}

.coupon-card {
  margin: 0;
}

@media (max-width: 960px) {
  .hero-grid,
  .promo-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-content {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.35rem;
  }

  nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.6rem;
    text-align: center;
  }

  .store-hero {
    padding: 2.25rem 0 1.75rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .catalog-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 480px) {
  .top-bar-content {
    align-items: flex-start;
    font-size: 0.82rem;
    text-align: left;
  }

  .header-content {
    gap: 0.9rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  nav a {
    flex: 0 0 auto;
    min-height: 2.35rem;
    padding: 0.45rem 0.5rem;
    font-size: 0.92rem;
  }

  .hero-search {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .preview-header,
  .preview-stack div,
  .product-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}
