/* ==========================================================================
   AIMNIWELL ARCHITECTURAL STOREFRONT — WORLD-CLASS LUXURY E-COMMERCE STYLES
   Design System: Apple / Kohler / Dyson Luxury Minimalism
   Spacing: Uniform 8pt System (80px Rhythm)
   Typography: SF Pro Display & Inter
   ========================================================================== */

:root {
  --store-bg: #ffffff;
  --store-card-bg: #ffffff;
  --store-thumb-bg: #f8fafc;
  --store-ink-primary: #090d16;
  --store-ink-secondary: #334155;
  --store-ink-muted: #64748b;
  --store-ink-subtle: #94a3b8;
  --store-accent-blue: #0055ff;
  --store-accent-blue-hover: #0040c7;
  --store-emerald: #059669;
  --store-emerald-bg: rgba(5, 150, 105, 0.08);
  --store-border: #e2e8f0;
  --store-border-light: #f1f5f9;
  --store-radius-lg: 20px;
  --store-radius-pill: 9999px;
  --store-shadow-sm: 0 2px 8px rgba(0, 20, 60, 0.04);
  --store-shadow-card: 0 10px 30px -10px rgba(0, 30, 80, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
  --store-shadow-hover: 0 24px 48px -15px rgba(0, 30, 80, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
  --store-transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --store-transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --store-transition-image: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Wrapper */
.aimniwell-shop-wrapper {
  background-color: var(--store-bg);
  min-height: 80vh;
  width: 100%;
  color: var(--store-ink-primary);
  overflow-x: hidden;
  padding-bottom: 96px;
}

/* --------------------------------------------------------------------------
   1. Editorial Hero Section & Category Story Strip
   -------------------------------------------------------------------------- */
.aimniwell-shop-hero {
  position: relative;
  padding: 80px 24px 40px;
  text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0, 85, 255, 0.05), transparent 75%);
  border-bottom: 1px solid var(--store-border-light);
}

.shop-hero-inner {
  max-width: 840px;
  margin: 0 auto;
}

.shop-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--store-radius-pill);
  background: rgba(0, 85, 255, 0.07);
  border: 1px solid rgba(0, 85, 255, 0.18);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--store-accent-blue);
  margin-bottom: 20px;
}

.shop-hero-badge .badge-sparkle {
  color: #f59e0b;
}

.shop-hero-title {
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--store-ink-primary);
  margin: 0 0 16px 0;
}

.shop-hero-desc {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--store-ink-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  font-weight: 400;
}

/* Category Filter Chips Strip */
.aimniwell-category-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto;
  max-width: 900px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--store-radius-pill);
  background: #ffffff;
  border: 1px solid var(--store-border);
  color: var(--store-ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--store-transition-fast);
  box-shadow: var(--store-shadow-sm);
  user-select: none;
}

.category-chip:hover {
  border-color: #cbd5e1;
  color: var(--store-ink-primary);
  transform: translateY(-1px);
}

.category-chip.active {
  background: var(--store-ink-primary);
  color: #ffffff;
  border-color: var(--store-ink-primary);
  box-shadow: 0 4px 16px rgba(9, 13, 22, 0.2);
}

.category-chip .chip-icon {
  font-size: 14px;
}

.category-chip .chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: var(--store-radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--store-ink-muted);
  margin-left: 2px;
}

.category-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   2. Container & Store Toolbar
   -------------------------------------------------------------------------- */
.aimniwell-shop-container {
  max-width: 1360px;
  width: 92%;
  margin: 0 auto;
  padding-top: 40px;
}

.aimniwell-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--store-border);
  border-radius: 16px;
  margin-bottom: 32px;
  box-shadow: var(--store-shadow-sm);
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-result-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--store-ink-muted);
  margin: 0;
}

.toolbar-result-count strong {
  color: var(--store-ink-primary);
}

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

/* Layout Grid Switcher */
.grid-layout-switcher {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.grid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--store-ink-muted);
  cursor: pointer;
  transition: all var(--store-transition-fast);
}

.grid-btn:hover {
  color: var(--store-ink-primary);
}

.grid-btn.active {
  background: #ffffff;
  color: var(--store-ink-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* WooCommerce Catalog Ordering Overrides */
.aimniwell-shop-toolbar .woocommerce-ordering {
  margin: 0;
  float: none;
}

.aimniwell-shop-toolbar .woocommerce-ordering select {
  padding: 8px 32px 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--store-border);
  background-color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--store-ink-secondary);
  cursor: pointer;
  outline: none;
  transition: border-color var(--store-transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.aimniwell-shop-toolbar .woocommerce-ordering select:focus {
  border-color: var(--store-accent-blue);
}

/* --------------------------------------------------------------------------
   3. Next-Gen Product Grid & Cards
   -------------------------------------------------------------------------- */
ul.products.aimniwell-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0 0 56px 0;
}

/* Editorial 2-Col Mode */
ul.products.aimniwell-products-grid.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* Compact 4-Col Mode on wide desktop */
@media (min-width: 1440px) {
  ul.products.aimniwell-products-grid.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* Luxury Product Card */
.aimniwell-product-card-item {
  margin: 0 !important;
  float: none !important;
  width: 100% !important;
}

.aimniwell-luxury-card {
  position: relative;
  background: var(--store-card-bg);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--store-shadow-card);
  transition: all var(--store-transition-smooth);
}

.aimniwell-luxury-card:hover {
  transform: translateY(-6px);
  border-color: #cbd5e1;
  box-shadow: var(--store-shadow-hover);
}

/* Product Thumbnail Stage */
.card-thumb-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--store-thumb-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.card-img-primary,
.card-img-secondary {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: all var(--store-transition-image);
}

.card-img-secondary {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

/* Dual-Image Hover Swap Effect */
.aimniwell-luxury-card:hover .card-img-primary {
  transform: scale(1.04);
}

.aimniwell-luxury-card:hover .card-img-secondary {
  opacity: 1;
  transform: scale(1.04);
}

/* Micro-Badges Floating in Corners */
.card-badge-top-left {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-badge-top-right {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.micro-badge.badge-sale {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.micro-badge.badge-warranty {
  background: rgba(9, 13, 22, 0.75);
  color: #ffffff;
}

.micro-badge.badge-3d {
  background: rgba(255, 255, 255, 0.9);
  color: var(--store-accent-blue);
  border: 1px solid rgba(0, 85, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Card Body & Metadata */
.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--store-accent-blue);
  margin-bottom: 6px;
}

.card-title {
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--store-ink-primary);
  margin: 0 0 10px 0;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--store-transition-fast);
}

.card-title a:hover {
  color: var(--store-accent-blue);
}

/* Feature Spec Chips */
.card-spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--store-ink-muted);
}

/* Color / Finish Swatches */
.card-swatches-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  outline: 1px solid #cbd5e1;
  display: inline-block;
}

.swatch-dot.swatch-alpine-white { background: #ffffff; }
.swatch-dot.swatch-matte-black { background: #1a1a1a; }
.swatch-dot.swatch-granite-grey { background: #555559; }

.swatches-label {
  font-size: 11px;
  color: var(--store-ink-subtle);
  margin-left: 4px;
}

/* Card Price Row */
.card-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--store-border-light);
  margin-bottom: 16px;
}

.card-price-row .price {
  font-size: 21px;
  font-weight: 800;
  color: var(--store-ink-primary);
  letter-spacing: -0.02em;
  margin: 0;
}

.card-price-row .price del {
  font-size: 14px;
  font-weight: 500;
  color: var(--store-ink-subtle);
  margin-right: 4px;
}

.card-price-row .price ins {
  text-decoration: none;
}

.card-discount-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--store-emerald-bg);
  color: var(--store-emerald);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Card Action Button */
.card-action-wrap {
  display: flex;
  gap: 8px;
}

.btn-card-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--store-ink-primary);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--store-transition-fast);
  border: none;
  cursor: pointer;
}

.btn-card-primary:hover {
  background: var(--store-accent-blue);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 85, 255, 0.3);
}

.btn-card-primary .btn-arrow {
  transition: transform var(--store-transition-fast);
}

.btn-card-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   4. In-Grid Editorial Brand Story Break (Transit Safe & Craft Guarantee)
   -------------------------------------------------------------------------- */
.aimniwell-editorial-break {
  grid-column: 1 / -1;
  background: radial-gradient(ellipse 90% 80% at 50% 10%, #17223b, #090d16);
  border-radius: 24px;
  padding: 56px 48px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 15, 40, 0.25);
  margin: 12px 0 24px 0;
}

.editorial-break-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 85, 255, 0.25), transparent 70%);
  pointer-events: none;
}

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

.editorial-break-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 12px;
}

.editorial-break-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: #ffffff;
}

.editorial-break-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: #94a3b8;
  margin: 0 0 32px 0;
}

.editorial-break-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.editorial-pillar-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.editorial-pillar-card .pillar-icon {
  font-size: 20px;
  line-height: 1;
}

.editorial-pillar-card strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 2px;
}

.editorial-pillar-card span {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   5. Store Bottom Trust & Reassurance Strip
   -------------------------------------------------------------------------- */
.aimniwell-store-trust-bar {
  margin-top: 64px;
  padding: 36px 32px;
  background: #f8fafc;
  border: 1px solid var(--store-border);
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trust-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--store-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}

.trust-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--store-ink-primary);
  margin-bottom: 2px;
}

.trust-info span {
  font-size: 12px;
  color: var(--store-ink-muted);
}

/* Empty State */
.aimniwell-no-products-box {
  text-align: center;
  padding: 80px 24px;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px dashed var(--store-border);
  margin: 40px 0;
}

.aimniwell-no-products-box h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.aimniwell-no-products-box p {
  color: var(--store-ink-muted);
  margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   6. Mobile & Responsive Layout
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  ul.products.aimniwell-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .aimniwell-store-trust-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .editorial-break-pillars {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .aimniwell-shop-hero {
    padding: 48px 16px 28px;
  }

  .shop-hero-title {
    font-size: 32px;
  }

  .aimniwell-category-chips {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .aimniwell-category-chips::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 12.5px;
  }

  .aimniwell-shop-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .toolbar-left, .toolbar-center, .toolbar-right {
    justify-content: space-between;
    width: 100%;
  }

  .aimniwell-shop-toolbar .woocommerce-ordering {
    width: 100%;
  }

  .aimniwell-shop-toolbar .woocommerce-ordering select {
    width: 100%;
  }

  ul.products.aimniwell-products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  ul.products.aimniwell-products-grid.grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .aimniwell-editorial-break {
    padding: 36px 20px;
  }

  .aimniwell-store-trust-bar {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }
}
