/* ============================================
   LAYOUT — Header
   ============================================ */

.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: none;
  transition: box-shadow var(--ease-base);
}

.site-header-wrap--scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.site-header {
  background: var(--color-surface);
  height: 64px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-logo-text {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: all var(--ease-fast);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-text);
  background: var(--color-bg);
  text-decoration: none;
}

.nav-link.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Cart badge */
.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Mobile nav */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  display: none;
  opacity: 0;
  transition: opacity var(--ease-base);
}

.mobile-nav-overlay.mobile-menu-overlay--visible {
  display: block;
  opacity: 1;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  background: var(--color-surface);
  z-index: 999;
  padding: var(--space-6) var(--space-4);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--ease-slow);
}

.mobile-nav.mobile-menu--open {
  transform: translateX(0);
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(4px);
}

.search-overlay.search-overlay--open {
  display: flex;
}

.search-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
}

.search-input {
  flex: 1;
  min-height: 0;
  padding: 0;
  border: none;
  outline: none;
  font-size: var(--text-md);
  color: var(--color-text);
  background: none;
}

.search-input::placeholder {
  color: var(--color-text-light);
}

.search-results {
  margin-top: var(--space-3);
  max-height: 320px;
  overflow-y: auto;
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--color-surface);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--ease-base);
  box-shadow: var(--shadow-lg);
}

.drawer.drawer--open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity var(--ease-base);
}

.drawer-backdrop.drawer-overlay--visible {
  display: block;
  opacity: 1;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.drawer-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.drawer-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  margin-top: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: var(--space-2) 0;
  display: none;
  z-index: 100;
}

.dropdown-menu.dropdown--open {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--ease-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--color-bg);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-2) 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-4);
  text-align: center;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

.empty-state-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-5);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  min-width: 0;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.breadcrumb__item:last-child {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

.breadcrumb__link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--ease-fast);
  white-space: nowrap;
}

.breadcrumb__link:hover { color: var(--color-primary); }

.breadcrumb__separator {
  color: var(--color-border);
  font-size: 10px;
  user-select: none;
  flex-shrink: 0;
}

.breadcrumb__current {
  color: var(--color-text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: auto;
}

/* Newsletter strip */
.footer-newsletter {
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-8) 0;
}

.footer-newsletter__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.footer-newsletter__text { }

.footer-newsletter__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: var(--space-1);
}

.footer-newsletter__sub {
  font-size: var(--text-sm);
  color: #64748b;
}

.footer-newsletter__form {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
  width: 380px;
}

.footer-newsletter__input {
  flex: 1;
  height: 40px;
  padding: 0 var(--space-4);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  color: #f1f5f9;
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--ease-fast);
}

.footer-newsletter__input::placeholder { color: #475569; }

.footer-newsletter__input:focus {
  border-color: var(--color-primary);
}

/* Main footer grid */
.footer-main {
  padding: var(--space-10) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-10);
}

.footer-col__brand { }

.footer-brand-logo {
  display: block;
  margin-bottom: var(--space-4);
}

.footer-brand-logo img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand-logo__text {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.footer-brand-desc {
  font-size: var(--text-sm);
  color: #64748b;
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.footer-social {
  display: flex;
  gap: var(--space-2);
}

.footer-social__link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  transition: background var(--ease-fast), color var(--ease-fast), border-color var(--ease-fast);
}

.footer-social__link:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.footer-col__title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f1f5f9;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  font-size: var(--text-sm);
  color: #64748b;
  text-decoration: none;
  transition: color var(--ease-fast);
}

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

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: #64748b;
  line-height: 1.6;
}

.footer-contact-item__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #475569;
}

.footer-contact-item a {
  color: #64748b;
  text-decoration: none;
}

.footer-contact-item a:hover { color: #f1f5f9; }

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-4) 0;
}

.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: #475569;
}

.footer-payments {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-payment-icon {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.3;
}

.footer-back-top {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: background var(--ease-fast), color var(--ease-fast);
}

.footer-back-top:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ============================================
   SEARCH PAGE
   ============================================ */

.search-page {
  padding: var(--space-8) 0 var(--space-16);
}

.search-page__bar {
  margin-bottom: var(--space-8);
}

.search-bar-large {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}

.search-bar-large:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.search-bar-large__input {
  flex: 1;
  height: 48px;
  padding: 0 var(--space-5);
  border: none;
  background: none;
  font-size: var(--text-md);
  color: var(--color-text);
  outline: none;
}

.search-bar-large__input::placeholder { color: var(--color-text-light); }

.search-bar-large__btn {
  height: 48px;
  padding: 0 var(--space-6);
  background: var(--color-primary);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
  transition: background var(--ease-fast);
}

.search-bar-large__btn:hover { background: var(--color-primary-dark); }

.search-page__meta {
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.search-page__count {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.search-page__count strong { color: var(--color-text); }

.search-page__section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border-light);
}

/* Search — no results */
.search-empty {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.search-empty__icon {
  width: 56px;
  height: 56px;
  color: var(--color-border);
  margin: 0 auto var(--space-4);
}

.search-empty__title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.search-empty__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.search-suggestions {
  margin-bottom: var(--space-8);
}

.search-suggestions__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.search-suggestions__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.search-suggestion-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--ease-fast);
}

.search-suggestion-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(26, 86, 219, 0.04);
}

/* ============================================
   ERROR PAGES
   ============================================ */

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-10) var(--space-5);
  background: var(--color-bg);
}

.error-page__code {
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  color: var(--color-border-light);
  letter-spacing: -0.04em;
  margin-bottom: 0;
  user-select: none;
}

.error-page__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  margin-top: calc(-1 * var(--space-4));
}

.error-page__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.error-page__search {
  width: 100%;
  max-width: 400px;
  margin-bottom: var(--space-6);
}

.error-page__links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-4) 0;
  transform: translateY(100%);
  transition: transform var(--ease-base);
}

.cookie-banner--visible { transform: translateY(0); }

.cookie-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  justify-content: space-between;
}

.cookie-banner__text {
  font-size: var(--text-sm);
  color: #94a3b8;
  flex: 1;
}

.cookie-banner__text a {
  color: #60a5fa;
  text-decoration: none;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ============================================
   EMPTY STATE (generic)
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.empty-state__icon {
  width: 48px;
  height: 48px;
  color: var(--color-border);
  margin-bottom: var(--space-4);
}

.empty-state__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.empty-state__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 360px;
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-newsletter__inner { flex-direction: column; gap: var(--space-4); }
  .footer-newsletter__form { width: 100%; }
}

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

  .footer-bottom__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .footer-payments { order: -1; }
}

@media (max-width: 480px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .drawer {
    width: 100%;
    max-width: 100vw;
  }

  .search-box {
    padding: var(--space-3);
  }
}

/* ============================================
   GLOBAL RESPONSIVE SAFETY
   ============================================ */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.main-content,
.container {
  min-width: 0;
}

.main-content img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   SHARED SECTION LAYOUT
   ============================================ */

.section {
  padding: var(--space-8) 0;
}

.section-sm {
  padding: var(--space-6) 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.section-title {
  margin: 0 0 var(--space-1);
  font-size: var(--text-2xl);
  color: var(--color-text);
}

.section-subtitle {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.usp-bar {
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.usp-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-5) 0;
}

.usp-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.usp-item__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.usp-item__icon--blue  { background: #dbeafe; color: #1d4ed8; }
.usp-item__icon--green { background: #dcfce7; color: #16a34a; }
.usp-item__icon--purple { background: #f3e8ff; color: #7c3aed; }
.usp-item__icon--orange { background: #ffedd5; color: #ea580c; }

.usp-item__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.usp-item__title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.usp-item__sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================
   HEADER + DRAWERS
   ============================================ */

.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.site-header {
  position: relative;
  z-index: var(--z-header);
}

.header-inner {
  min-height: var(--header-h);
}

.header-action-btn {
  min-width: 36px;
  min-height: 36px;
}

/* Cart drawer: 400px desktop */
.drawer {
  width: 400px;
}

@media (max-width: 1024px) {
  .usp-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }
}

@media (max-width: 576px) {
  .container {
    padding-right: var(--space-3) !important;
    padding-left: var(--space-3) !important;
  }

  .usp-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3) var(--space-2);
    padding: var(--space-4) 0;
  }

  .usp-item__icon {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 768px) {
  :root {
    --text-xs: 0.875rem;
    --text-sm: 0.875rem;
  }

  .site-header {
    height: 64px;
  }

  .header-inner {
    justify-content: space-between;
    gap: var(--space-1);
  }

  .header-nav,
  .header-auth-link,
  .header-user-menu {
    display: none !important;
  }

  .header-logo {
    position: relative;
    left: auto;
    transform: none;
    z-index: auto;
    max-width: calc(100% - 150px);
    order: -1;
  }

  .header-logo img {
    height: 28px;
    max-height: 40px;
    width: auto;
  }

  .header-logo-text {
    font-size: var(--text-md);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-actions {
    margin-left: 0;
    gap: 0;
  }

  .header-action-btn {
    width: 44px;
    height: 44px;
  }

  #mobile-menu-toggle {
    display: inline-flex !important;
    order: 99;
  }

  .mobile-nav a.nav-link {
    min-height: 44px;
  }

  /* Cart drawer: leave a visible backdrop strip so overlay click can close it */
  .drawer {
    width: min(360px, calc(100vw - 56px));
    max-width: calc(100vw - 56px);
  }
}

@media (max-width: 480px) {
  .header-logo {
    max-width: calc(100% - 170px);
  }

  .header-logo img {
    height: 24px;
  }
}

/* ============================================
   HOME PAGE RESPONSIVE
   ============================================ */

.home-hero {
  position: relative;
  overflow: hidden;
}

.home-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 560px;
}

.home-category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-3);
}

.home-category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 360px;
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 1024px) {
  .home-hero {
    height: 360px !important;
  }

  .home-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-hero {
    height: 320px !important;
  }

  .home-hero__content {
    max-width: 100% !important;
  }

  .home-hero__actions {
    width: 100%;
  }

  .home-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .home-blog-grid {
    grid-template-columns: 1fr;
  }

  .home-newsletter-form {
    flex-wrap: wrap;
  }

  .home-newsletter-form .form-control,
  .home-newsletter-form .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .home-hero {
    height: 280px !important;
  }

  .home-category-grid,
  .home-product-grid {
    gap: var(--space-2);
  }
}

/* ============================================
   SEARCH, BLOG, ACCOUNT HELPERS
   ============================================ */

.search-page__sort-form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.blog-grid,
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.blog-grid img,
.blog-related-grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 260px;
}

.orders-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-table-wrap .orders-table {
  min-width: 680px;
}

@media (max-width: 1024px) {
  .blog-grid,
  .blog-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .search-page__meta {
    align-items: flex-start;
  }

  .search-page__sort-form {
    width: 100%;
  }

  .search-page__sort-label {
    width: 100%;
  }

  .search-page__sort-form .form-control {
    width: 100% !important;
    max-width: 100%;
  }

  .search-bar-large__btn {
    padding: 0 var(--space-4);
    font-size: var(--text-sm);
  }

  .blog-grid,
  .blog-related-grid {
    grid-template-columns: 1fr;
  }

  .blog-index-search {
    width: 100%;
    min-width: 0 !important;
  }

  .blog-index-search .form-control {
    min-width: 0;
  }

  .account-form-grid-2,
  .account-address-grid-2,
  .account-address-grid-3,
  .auth-name-grid {
    grid-template-columns: 1fr !important;
  }

  .account-order-actions {
    flex-wrap: wrap;
  }

  .account-order-actions form {
    margin-left: 0 !important;
    width: 100%;
  }

  .account-order-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .auth-page.auth-page--embedded {
    padding: var(--space-6) 0 var(--space-10);
  }

  .auth-page.auth-page--embedded .auth-card {
    width: 100%;
    max-width: none;
  }
}
