@import url('colors.css');
@import url('typography.css');
@import url('buttons.css');
@import url('cards.css');
@import url('layout.css');
@import url('forms.css');
@import url('animations.css');
@import url('responsive.css');

/* Additional global overrides */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Skeleton Loading Grid */
.product-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.product-card-skeleton {
  height: 320px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #EFECE6 25%, #F7F4EE 50%, #EFECE6 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ------------------------------------------------------------------ */
/* Navbar logo — enlarged symbol-only branding (text removed)          */
/* ------------------------------------------------------------------ */
.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
  margin-right: 8px;
}

.nav-logo img {
  height: 58px;
  width: auto;
  max-width: none;
  object-fit: contain;
  transition: height 0.2s ease;
}

/* Slightly shrink the logo once the sticky nav compacts on scroll,
   so the navbar never grows unnecessarily tall */
#mainNav.nav-shrink .nav-logo img {
  height: 44px;
}

@media (max-width: 992px) {
  .nav-logo img {
    height: 48px;
  }

  #mainNav.nav-shrink .nav-logo img {
    height: 38px;
  }
}

@media (max-width: 576px) {
  .nav-logo img {
    height: 40px;
  }

  #mainNav.nav-shrink .nav-logo img {
    height: 34px;
  }
}

/* ============================================================
   ADD-TO-CART VISIBILITY FIX — shared by Shop grid + Home
   New Arrivals grid, since both render `.product-card` /
   `.card-overlay` markup from the same design-system classes
   (cards.css / buttons.css, imported above).

   ROOT CAUSE: `.card-overlay` (which contains the Add to Cart
   button, absolutely positioned over `.card-img-wrap`) is a
   hover-reveal layer — visible only via
   `.product-card:hover .card-overlay { opacity:1 }`. That has
   no equivalent on touch devices (mobile/tablet: no :hover), so
   the button existed in the DOM but was never visible or
   tappable there. It could also get clipped if `.card-img-wrap`
   used `overflow:hidden` with a mismatched overlay height.

   This block does NOT change colors, radius, shadows, product
   image styling, or the premium hover feel on desktop — it only
   guarantees the button is always visible/reachable everywhere,
   and keeps the existing subtle hover emphasis on devices that
   actually support hover.
   ============================================================ */
.product-card {
  position: relative;
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
}

.card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  z-index: 3;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  background: transparent;
}

.card-overlay .btn {
  width: 100% !important;
  max-width: 220px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background-color: var(--primary) !important;
  color: #FFFFFF !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 10px 18px !important;
  border-radius: var(--radius-pill) !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(32, 90, 62, 0.2) !important;
  transition: background-color var(--transition-fast, 0.2s) ease,
              transform var(--transition-fast, 0.2s) ease,
              box-shadow var(--transition-fast, 0.2s) ease !important;
  text-decoration: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.card-overlay .btn:hover {
  background-color: var(--primary-dark) !important;
  box-shadow: 0 6px 16px rgba(32, 90, 62, 0.3) !important;
}

.card-overlay .btn i {
  font-size: 0.9rem !important;
  color: #FFFFFF !important;
}

/* Reveal Add to Cart on hover on devices that support hover */
@media (hover: hover) and (pointer: fine) {
  .card-overlay {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease,
                transform 0.25s ease,
                visibility 0.25s ease;
  }

  .product-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (max-width: 576px) {
  .card-overlay {
    padding: 8px 6px;
  }

  .card-overlay .btn {
    font-size: 0.78rem !important;
    padding: 8px 10px !important;
  }
}