/* Fern Merch — Simple, clean, purple themed styling */
:root {
  --purple: #6b21a8;
  /* main purple */
  --purple-700: #5a189a;
  --bg: #fafafa;
  --muted: #6b7280;
  --card-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box
}

body {
  font-family: Inter, system-ui, Segoe UI, Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: #111
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem
}

.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 70px;
  transition: all 0.3s ease;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: space-between;
  position: relative;
  padding-left: 72px;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: var(--purple);
  text-decoration: none;
  font-size: 1.1rem;
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 120;
}

.brand-logo {
  width: auto;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.brand:hover .brand-logo {
  transform: rotate(-5deg) scale(1.1);
}

@media(min-width:900px) {
  .brand {
    left: 72px
  }
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--purple), #9333ea);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-nav a {
  margin: 0 0.5rem;
  text-decoration: none;
  color: #333;
}

.main-nav a.active {
  color: var(--purple)
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem
}

.menu-toggle {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  padding: 0.2rem;
  border: 1px solid rgba(16, 24, 40, 0.06);
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease
}

.menu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08)
}

.menu-toggle:focus {
  outline: 2px solid rgba(99, 102, 241, 0.15);
}

@media(min-width:900px) {
  .menu-toggle {
    left: 10px;
    top: 10px
  }
}

.cart-btn {
  background: transparent;
  border: 1px solid #eee;
  padding: 0.4rem 0.6rem;
  border-radius: 6px
}

.cart-btn span {
  background: var(--purple);
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 12px;
  margin-left: 0.4rem;
  font-size: 0.8rem
}

.hero {
  padding: 2rem 0
}

.hero-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  min-height: 500px;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text h1 {
  font-size: 3rem;
  /* Larger for impact */
  margin: 0 0 1rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #111, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  color: var(--muted);
  margin: 0 0 2rem;
  line-height: 1.7;
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--purple);
  color: #fff
}

.btn-primary:hover {
  background: var(--purple-700)
}

.btn-outline {
  border: 1px solid var(--purple);
  color: var(--purple);
  background: #fff
}

.btn-outline:hover {
  background: #f8f1ff
}

.order-whatsapp {
  background: #25D366;
  border: none;
  color: #fff;
  text-align: center;
}

.order-whatsapp:hover {
  background: #1ebe5b
}

.btn-small {
  padding: 0.4rem 0.6rem;
  border-radius: 16px
}

.muted {
  color: var(--muted)
}

.grid {
  display: grid;
  gap: 1rem
}

.grid-cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr))
}

.card {
  background: #fff;
  border-radius: 20px;
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(107, 33, 168, 0.12);
  border-color: rgba(107, 33, 168, 0.1);
}

.card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.6s ease;
}

.card:hover img {
  transform: scale(1.03);
}

.card h3 {
  margin: 1rem 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.category-hero {
  padding: 1rem 0 0
}

.grid-products {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 1rem 0
}

.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column
}

.product-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.4s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}


.product-body {
  padding: 0.85rem
}

.product-title {
  margin: 0 0 0.35rem
}

.product-price {
  color: var(--purple);
  font-weight: 700;
  margin: 0 0 0.6rem
}

.product-actions {
  display: flex;
  gap: 0.5rem
}

/* Floating WhatsApp action - circular button with SVG icon */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  z-index: 9999;
}

.whatsapp-float .wa-svg {
  display: block;
  width: 22px;
  height: 22px
}

.whatsapp-float:hover {
  transform: scale(1.06);
  background: #1ebe57;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22)
}

.whatsapp-float:focus {
  outline: 3px solid rgba(37, 211, 102, 0.18);
  outline-offset: 4px;
  border-radius: 50%
}

/* Button visual refinements (keeps desktop layout unchanged but tightens mobile) */
.btn-small {
  padding: 0.45rem 0.9rem;
  border-radius: 10px
}

.product-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center
}

.product-actions .btn {
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04)
}

@media(max-width:600px) {

  /* Center buttons and make them compact on small screens */
  .product-actions {
    justify-content: center;
    gap: 0.75rem;
    padding-top: 0.5rem
  }

  .product-card .btn {
    flex: 0 0 auto;
    width: calc(50% - 8px);
    max-width: 160px
  }

  .product-card .btn {
    padding: 0.5rem 0.9rem;
    border-radius: 10px
  }

  .product-actions .order-whatsapp {
    white-space: nowrap
  }
}

.site-footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 2.5rem 0;
  margin-top: 2rem;
  text-align: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.site-footer strong {
  display: block;
  font-size: 1.15rem;
  color: var(--purple);
  margin-bottom: 0.3rem;
}

.site-footer p {
  margin: 0.4rem 0;
}

/* Social link styles - inline icon + label */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600
}

.social-link .social-icon {
  width: 18px;
  height: 18px;
  display: inline-block
}

.social-link .social-text {
  font-weight: 600
}

.social-link:hover {
  color: var(--purple);
  transform: translateY(-1px)
}

.muted {
  color: var(--muted)
}

/* Auto-sliding Gallery Styles - Mobile First */
.fern-gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  /* Square aspect ratio for mobile by default */
  aspect-ratio: 1 / 1;
  background: #eee;
}

.fern-slider {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  /* Force width for calculation base */
  height: 100% !important;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* GPU acceleration for mobile */
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.fern-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  position: relative;
}

.fern-slide img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
  /* Ensure whole image appears as requested */
  border-radius: 12px;
}

/* Desktop enhancements */
@media(min-width: 800px) {
  .fern-gallery {
    aspect-ratio: auto;
    height: 400px;
  }

  .fern-slide img {
    object-fit: cover;
    /* Back to cover for desktop hero look */
  }
}

/* Pause animation on hover (desktop only) */
@media(min-width: 800px) {
  .fern-gallery:hover .fern-slider {
    cursor: grab;
  }
}

@media(min-width:800px) {
  .hero-inner {
    padding: 2rem 0;
    align-items: center
  }

  .hero-text {
    flex: 0 0 62%;
    max-width: 62%;
    padding-right: 2rem
  }

  .hero-image {
    flex: 0 0 35%;
    max-width: 35%
  }

  .hero-image .fern-slide img {
    box-shadow: 0 8px 24px rgba(107, 33, 168, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease
  }

  .hero-image .fern-slide img:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(107, 33, 168, 0.18)
  }

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

/* small touches */
.btn:hover {
  transform: translateY(-1px);
  transition: all .12s ease
}

.product-card .btn {
  flex: 1
}

/* Mobile override: keep product action buttons compact and centered */
@media(max-width:600px) {
  .product-actions {
    justify-content: center
  }

  .product-card .btn {
    flex: 0 0 auto;
    width: calc(50% - 10px);
    max-width: 160px;
    padding: 0.5rem 0.9rem;
    border-radius: 10px
  }

  .product-actions .btn+.btn {
    margin-left: 0.5rem
  }

  .product-actions .btn {
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04)
  }
}

/* Very small screens: stack buttons with fixed width and centered alignment */
@media(max-width:420px) {
  .product-actions {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center
  }

  .product-card .btn {
    width: 160px;
    max-width: 160px
  }
}

/* Cart Modal styles */
.cart-modal {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.1);
  padding: 1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  overflow: hidden
}

.cart-modal .cart-list {
  overflow: auto;
  padding-right: 0.5rem;
  margin-top: 0.5rem
}

.cart-item {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f1f1
}

.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
  flex-shrink: 0
}

.clear-btn {
  background: #eee;
  border-radius: 8px;
  padding: 0.5rem
}

@media(max-width:480px) {
  .cart-modal {
    left: 16px;
    right: 16px;
    top: 60px;
    width: auto;
    max-height: calc(100vh - 100px)
  }
}

.cart-total {
  margin-top: 0.5rem
}

/* mobile */
@media(max-width:600px) {
  .hero-inner {
    flex-direction: column;
    min-height: auto
  }

  .hero-image {
    order: 1;
    width: 80%;
    max-width: 320px;
    margin: 1rem auto 0;
  }

  .hero-image .fern-slide img {
    box-shadow: 0 4px 16px rgba(107, 33, 168, 0.1)
  }

  .hero-text {
    order: 0;
    width: 100%
  }

  .main-nav {
    display: none
  }

  .nav-wrap {
    gap: 0.5rem;
    padding-left: 16px
  }

  .brand-name {
    display: block;
    font-size: 0.95rem;
  }

  /* place the toggle at the left edge and ensure logo sits to its right */
  .menu-toggle {
    left: 16px;
    top: 12px
  }

  .brand {
    left: 52px;
    gap: 0.4rem;
  }

  /* mobile side-nav expands full-width within the container, below header and logo */
  .side-nav {
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    min-width: auto;
    padding: 0.6rem
  }
}

/* Side nav / dropdown (polished) */
.header-left {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem
}

/* Place the dropdown above other elements when open and keep it compact so it doesn't cover the logo */
.side-nav {
  position: absolute;
  left: 12px;
  top: calc(100% + 12px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(16, 24, 40, 0.04);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  min-width: 200px;
  max-width: 320px;
  z-index: 220;
  opacity: 0;
  transform: translateY(-8px) scale(0.99);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s ease, box-shadow .18s ease;
  pointer-events: none
}

.side-nav.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto
}

.side-nav a {
  display: block;
  padding: 0.6rem 0.95rem;
  color: #111;
  text-decoration: none;
  border-radius: 8px;
  margin: 4px 0;
  font-weight: 600
}

.side-nav a:hover {
  background: rgba(247, 246, 251, 0.85);
  color: var(--purple)
}

@media(max-width:600px) {

  /* on small screens keep the menu aligned to the left toggle and avoid covering the brand */
  .side-nav {
    left: 16px;
    right: auto;
    top: calc(100% + 12px);
    min-width: 180px;
    max-width: calc(100% - 96px)
  }
}

@media(min-width:900px) {
  .side-nav {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    min-width: 220px
  }

  .side-nav a {
    padding: 0.5rem 0.8rem
  }

  .menu-toggle {
    display: inline-block
  }
}

/* Keep WhatsApp order buttons from wrapping */
.order-whatsapp {
  white-space: nowrap;
  display: inline-flex;
  align-items: center
}

.wa-icon {
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 1.05rem;
  line-height: 1
}

.footer-wa {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--purple)
}

.footer-wa .wa-icon {
  margin-right: 0.5rem
}