:root {
  --navy: #0b1f3a;
  --navy-2: #102f57;
  --navy-3: #17406f;
  --accent: #2d9cdb;
  --ink: #172033;
  --muted: #667085;
  --line: #d7dde8;
  --surface: #ffffff;
  --page: #f3f7fb;
}

html {
  font-size: 15px;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef5fb 0, var(--page) 260px, #f8fafc 100%);
}

a {
  color: var(--navy-3);
}

.site-navbar {
  background: var(--navy);
  box-shadow: 0 10px 24px rgba(11, 31, 58, .16);
}

.navbar-brand {
  letter-spacing: .2px;
}

.site-navbar .nav-link {
  color: rgba(255, 255, 255, .86) !important;
}

.site-navbar .nav-link:hover {
  color: #fff !important;
}

.cart-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.cart-badge {
  min-width: 1.7rem;
  height: 1.7rem;
  display: inline-grid;
  place-items: center;
  padding: 0 .45rem;
  border-radius: 999px;
  background: #e8eef7;
  color: var(--navy);
  font-size: .8rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(11, 31, 58, .15);
}

.cart-badge.has-items {
  background: #ffcc4d;
  color: #1d2433;
  box-shadow: 0 0 0 3px rgba(255, 204, 77, .25);
}

.store-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 0 .75rem;
}

.storefront-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(370px, .98fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
  min-height: 530px;
  margin: .5rem 0 2.5rem;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
  border-bottom: 1px solid #cddbeb;
  overflow: clip;
}

.storefront-copy {
  position: relative;
  z-index: 2;
}

.storefront-copy h1 {
  max-width: 650px;
  margin: .55rem 0 1.25rem;
  color: var(--navy);
  font-size: clamp(2.7rem, 5.3vw, 5rem);
  line-height: .95;
  font-weight: 850;
}

.storefront-copy h1 span {
  display: block;
  color: var(--navy-3);
}

.storefront-copy p {
  max-width: 570px;
  margin-bottom: 1.5rem;
  color: #4c5d73;
  font-size: 1.08rem;
  line-height: 1.65;
}

.storefront-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.storefront-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.storefront-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  margin-top: 1.5rem;
  color: #53657e;
  font-size: .88rem;
  font-weight: 700;
}

.storefront-benefits span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.storefront-benefits i {
  color: var(--navy-3);
  font-size: 1rem;
}

.storefront-visual {
  position: relative;
  min-height: 450px;
}

.visual-backdrop {
  position: absolute;
  inset: 1.4rem 2rem 2rem 1.4rem;
  border: 1px solid #bfd3e9;
  background: #e7f0f9;
  box-shadow: 28px 28px 0 #c8dff2;
  transform: rotate(-3deg);
}

.hero-product-stage {
  position: relative;
  height: 425px;
}

.hero-product-tile {
  position: absolute;
  display: grid;
  gap: .35rem;
  width: 48%;
  padding: .55rem;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid #c7d7e8;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(11, 31, 58, .16);
  transition: transform .24s ease, box-shadow .24s ease;
}

.hero-product-tile img {
  width: 100%;
  aspect-ratio: 1 / .82;
  object-fit: cover;
  background: #dfeaf5;
  border-radius: 5px;
}

.hero-product-tile strong {
  overflow: hidden;
  color: var(--navy);
  font-size: .95rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-product-tile small {
  color: var(--navy-3);
  font-size: .83rem;
  font-weight: 800;
}

.hero-product-tile small.hero-wholesale-note,
.featured-card small.hero-wholesale-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .25rem .45rem;
  color: #0f5132;
  background: #e9f8ee;
  border: 1px solid #bde6ca;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
}

.hero-product-category {
  overflow: hidden;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-product-tile-1 {
  top: 1rem;
  left: 1rem;
  transform: rotate(-6deg);
}

.hero-product-tile-2 {
  top: 3.6rem;
  right: .5rem;
  transform: rotate(5deg);
}

.hero-product-tile-3 {
  bottom: 0;
  left: 21%;
  transform: rotate(-1deg);
}

.hero-product-tile:only-child {
  top: 1.25rem;
  right: 10%;
  left: auto;
  width: 62%;
  transform: rotate(4deg);
}

.storefront-visual:hover .hero-product-tile-1 {
  transform: translate(-5px, -8px) rotate(-7deg);
}

.storefront-visual:hover .hero-product-tile-2 {
  transform: translate(7px, -6px) rotate(6deg);
}

.storefront-visual:hover .hero-product-tile-3 {
  transform: translate(2px, -10px) rotate(1deg);
}

.hero-product-tile:hover {
  z-index: 3;
  box-shadow: 0 24px 48px rgba(11, 31, 58, .24);
}

.storefront-counter {
  position: absolute;
  z-index: 4;
  right: -1rem;
  bottom: -1.1rem;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .72rem .9rem;
  color: var(--navy);
  background: #ffcf5a;
  border: 1px solid #e6ad28;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(11, 31, 58, .16);
  transform: rotate(-2deg);
}

.storefront-counter-icon {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 50%;
}

.storefront-counter strong,
.storefront-counter small {
  display: block;
}

.storefront-counter strong {
  font-size: .86rem;
}

.storefront-counter small {
  color: #5e4816;
  font-size: .74rem;
}

.empty-hero-stage {
  position: relative;
  z-index: 1;
  display: grid;
  height: 425px;
  place-content: center;
  gap: .75rem;
  padding: 2rem;
  color: var(--navy);
  text-align: center;
}

.empty-hero-stage i {
  font-size: 3rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: #b7d8ff;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .76rem;
}

.hero-kicker.dark {
  color: var(--navy-3);
}

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .52s ease, transform .52s cubic-bezier(.2, .75, .25, 1);
}

.motion-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

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

.section-heading h2 {
  margin: .15rem 0 0;
  color: var(--navy);
  font-weight: 800;
}

.featured-section,
.catalog-section {
  margin-bottom: 2.25rem;
  scroll-margin-top: 96px;
}

.featured-products-swiper {
  padding: .25rem .25rem 2.25rem;
}

.featured-card {
  display: grid;
  gap: .45rem;
  height: 100%;
  padding: .8rem;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(16, 47, 87, .08);
}

.featured-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  background: #edf2f8;
}

.featured-card span {
  color: var(--muted);
  font-size: .85rem;
}

.featured-card strong {
  color: var(--navy);
  font-size: 1.08rem;
}

.featured-card small,
.product-price {
  color: var(--navy-3);
  font-size: 1.15rem;
}

.product-wholesale-note {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: fit-content;
  padding: .4rem .55rem;
  color: #0f5132;
  background: #e9f8ee;
  border: 1px solid #bde6ca;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.2;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.category-chip {
  border: 1px solid #cbd8e8;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: .45rem .85rem;
  font-weight: 700;
}

.category-chip.active,
.category-chip:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.store-header h1 {
  max-width: 780px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: 1.02;
  font-weight: 800;
}

.btn-dark {
  background: var(--navy);
  border-color: var(--navy);
}

.btn-dark:hover,
.btn-dark:focus {
  background: var(--navy-2);
  border-color: var(--navy-2);
}

.btn-outline-dark {
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline-dark:hover {
  background: var(--navy);
  border-color: var(--navy);
}

.product-card,
.metric,
.variant-admin-row,
.checkout-form,
.admin-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(16, 47, 87, .08);
}

.product-card {
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
}

.product-card-pro {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16, 47, 87, .14);
}

.product-image-link {
  position: relative;
  display: block;
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1 / .78;
  object-fit: cover;
  background: #edf2f8;
}

.product-stock-pill {
  position: absolute;
  right: .75rem;
  top: .75rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(11,31,58,.18);
}

.product-card-body {
  display: grid;
  gap: .9rem;
  padding: 1rem;
}

.product-card-title {
  min-height: 2.7rem;
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.25;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: .75rem;
  margin-top: auto;
}

.product-stock-pill.available {
  background: #198754;
}

.product-stock-pill.soldout {
  background: #dc3545;
}

.detail-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #edf2f8;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(16, 47, 87, .1);
}

.product-detail-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 20px 44px rgba(16, 47, 87, .1);
}

.detail-media {
  position: relative;
}

.detail-badge {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: .45rem .8rem;
  color: var(--navy);
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  font-weight: 800;
}

.product-detail-title {
  color: var(--navy);
  font-weight: 850;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.price-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: #eef5fb;
  border: 1px solid #d7e6f4;
}

.price-panel span {
  color: var(--muted);
  font-weight: 700;
}

.price-panel strong {
  color: var(--navy);
  font-size: 1.6rem;
}

.wholesale-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: -.35rem 0 1rem;
  padding: .9rem 1rem;
  color: #0f5132;
  background: #e9f8ee;
  border: 1px solid #bde6ca;
  border-radius: 12px;
}

.wholesale-summary div,
.wholesale-summary span {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.wholesale-summary span {
  font-weight: 800;
}

.wholesale-summary strong {
  color: #0f5132;
  font-size: 1.45rem;
}

.wholesale-summary small {
  color: #245b3c;
  font-weight: 700;
  text-align: right;
}

.buy-panel {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: .75rem;
  align-items: end;
  margin-top: 1rem;
}

.wholesale-quantity-hint {
  margin-top: .45rem;
  padding: .52rem .6rem;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.25;
}

.wholesale-quantity-hint.is-pending {
  color: #664d03;
  background: #fff3cd;
  border: 1px solid #ffecb5;
}

.wholesale-quantity-hint.is-applied {
  color: #0f5132;
  background: #e9f8ee;
  border: 1px solid #bde6ca;
}

.cart-next-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #eef7f1;
  border: 1px solid #cce8d4;
}

.cart-next-panel strong,
.cart-next-panel span {
  display: block;
}

.cart-next-panel span {
  color: var(--muted);
  font-size: .92rem;
}

.cart-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.badge.text-bg-light {
  background: #e9f2fb !important;
  color: var(--navy) !important;
  border: 1px solid #cfe0f2;
}

.variant-list {
  display: grid;
  gap: .75rem;
}

.variant-option {
  display: flex;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
}

.variant-option:has(input:checked) {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 3px rgba(23, 64, 111, .12);
}

.variant-option small {
  display: block;
  color: var(--muted);
}

.variant-copy {
  display: grid;
  gap: .25rem;
}

.variant-wholesale-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: fit-content;
  padding: .32rem .5rem;
  color: #0f5132;
  background: #e9f8ee;
  border: 1px solid #bde6ca;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.15;
}

.variant-option.disabled {
  opacity: .55;
  cursor: not-allowed;
}

.checkout-form,
.admin-form {
  max-width: 920px;
  padding: 1.25rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 .2rem rgba(23, 64, 111, .16);
}

.cart-thumb,
.admin-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.metric {
  padding: 1rem;
  border-top: 4px solid var(--navy-3);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}

.metric strong {
  color: var(--navy);
  font-size: 1.5rem;
}

.variant-admin-row {
  padding: 1rem;
  margin-bottom: 1rem;
}

.variant-admin-heading,
.variant-admin-row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}

.variant-admin-heading {
  margin-bottom: .85rem;
}

.variant-admin-row-title {
  margin-bottom: .75rem;
  color: var(--navy);
}

.variant-admin-row-title strong {
  font-size: .95rem;
}

.purchase-line {
  padding: .9rem;
  margin-bottom: .75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.purchase-form .select2-container {
  min-width: 100%;
}

.inventory-inline-form {
  display: grid;
  grid-template-columns: minmax(76px, .55fr) minmax(140px, 1fr) auto;
  gap: .4rem;
  min-width: 310px;
}

.table {
  background: #fff;
  border-color: var(--line);
}

.table thead {
  color: var(--navy);
}

.timeline {
  display: grid;
  gap: .5rem;
}

.location-status {
  min-height: 1.25rem;
  color: var(--muted);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
  padding: 3px;
}

.store-logo-preview {
  max-width: 220px;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: .75rem;
}

.tracking-box {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy-3);
  border-radius: 8px;
  padding: 1rem;
}

.payment-change-box {
  background: #eef7f1;
  border: 1px solid #cce8d4;
  border-radius: 8px;
  color: #0f5132;
  padding: .85rem 1rem;
}

.payment-change-box.insufficient {
  background: #fff3cd;
  border-color: #ffecb5;
  color: #664d03;
}

.delivery-action {
  background: #eef7f1;
  border: 1px solid #cfead9;
  border-radius: 8px;
  padding: 1rem;
}

.text-navy {
  color: var(--navy);
}

.login-logo-img {
  max-width: 72px;
  max-height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto .5rem;
}

.app-sidebar .brand-image {
  object-fit: contain;
  background: #fff;
}

.app-content .table {
  box-shadow: 0 10px 24px rgba(16, 47, 87, .06);
}

.app-content h1 {
  color: var(--navy);
}

footer {
  background: #fff;
}

@media (max-width: 640px) {
  body {
    background: #f8fafc;
  }

  main.container {
    padding-left: .85rem;
    padding-right: .85rem;
  }

  .site-navbar .container {
    align-items: flex-start;
  }

  .brand-lockup span {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .storefront-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: auto;
    margin-top: 0;
    padding: 1.5rem 0 3rem;
  }

  .storefront-copy h1 {
    font-size: 2.7rem;
    line-height: .98;
  }

  .storefront-copy p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
  }

  .storefront-actions .btn {
    justify-content: center;
  }

  .storefront-benefits {
    display: grid;
    gap: .5rem;
    margin-top: 1.25rem;
  }

  .storefront-visual {
    min-height: 300px;
  }

  .visual-backdrop {
    inset: .9rem 1.6rem 1.6rem .75rem;
    box-shadow: 14px 14px 0 #c8dff2;
  }

  .hero-product-stage,
  .empty-hero-stage {
    height: 280px;
  }

  .hero-product-tile {
    width: 49%;
    padding: .45rem;
  }

  .hero-product-tile img {
    aspect-ratio: 1 / .74;
  }

  .hero-product-tile strong {
    font-size: .82rem;
  }

  .hero-product-tile small {
    font-size: .78rem;
  }

  .hero-product-category {
    font-size: .62rem;
  }

  .hero-product-tile-1 {
    top: .5rem;
    left: .15rem;
  }

  .hero-product-tile-2 {
    top: 2.15rem;
    right: .15rem;
  }

  .hero-product-tile-3 {
    bottom: .35rem;
    left: 22%;
  }

  .hero-product-tile:only-child {
    top: .75rem;
    right: 11%;
    width: 64%;
  }

  .storefront-counter {
    right: .35rem;
    bottom: -.25rem;
    max-width: calc(100% - 1rem);
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .category-filters {
    justify-content: flex-start;
  }

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

  .cart-next-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .cart-next-actions,
  .cart-next-actions .btn {
    width: 100%;
  }

  .product-detail-shell {
    border-radius: 14px;
    padding: .85rem;
  }

  .product-detail-title {
    font-size: 2rem;
  }

  .price-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .wholesale-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .wholesale-summary small {
    text-align: left;
  }

  .featured-products-swiper {
    margin-left: -.25rem;
    margin-right: -.25rem;
  }

  .product-card-body {
    padding: .9rem;
  }

  .product-card-title {
    min-height: auto;
  }

  .product-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .product-card-footer .btn,
  .product-card .btn {
    width: 100%;
  }

  .inventory-inline-form {
    grid-template-columns: 1fr;
    min-width: 220px;
  }

  .cart-page,
  .table-responsive-mobile,
  .app-content {
    overflow-x: auto;
  }

  .cart-page table,
  .app-content table {
    min-width: 680px;
  }

  .store-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
