/* ==========================================================================
   RUGGED GEAR GUIDE — GLOBAL STYLES (CLEAN & ORGANIZED)
   ========================================================================== */

/* =========================
   0) TOKENS / THEME
   ========================= */
:root{
  /* Core palette */
  --bg:#0f1115;
  --surface:#151923;
  --muted:#9aa3b2;
  --fg:#e8edf5;
  --accent:#81b9bb;     /* CTA mint */
  --accent2:#81b9bb;    /* secondary */
  --border:#232834;

  /* Cards */
  --card:#0e141a;
  --ink:#d8d8d3;
  --line:rgba(255,255,255,.06);

  /* Textured brand + button (you can swap this path) */
  
  --tx-tint-1:#699783;  /* top tint for texture */
  --tx-tint-2:#699783;  /* bottom tint */
}

/* =========================
   1) RESET / BASE
   ========================= */
*{ box-sizing:border-box }
html,body{ margin:0 }
html,body{ overflow-x:hidden }  /* prevent accidental horizontal scroll */

body{
  font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--fg);
  background:linear-gradient(180deg,#010203,#06090c 50%,#030404 100%) fixed;
}

a{ color:inherit; text-decoration:none }
.wrap{ width:min(1100px,92vw); margin:0 auto; padding:0 16px }
.wrap{ padding-left:14px; padding-right:14px } /* subtle tightening */

/* =========================
   2) HEADER / NAV
   ========================= */
header{
  position:sticky; top:0; z-index:100;
  background:rgba(10,12,16,.85);
  backdrop-filter:saturate(130%) blur(8px);
  border-bottom:1px solid var(--border);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0; position:relative; z-index:1;
}

.brand{ font-weight:900; letter-spacing:.2px }
.brand span{ color:var(--accent) } /* default brand accent */

/* Textured “.com” — only this span gets texture */
.brand .dotcom{
  display:inline-block;
  background:
    linear-gradient(var(--tx-tint-1), var(--tx-tint-2)),
    var(--tx-url) center/cover no-repeat;
  background-blend-mode:multiply;
  -webkit-background-clip:text;
          background-clip:text;
  color:transparent;
  filter:saturate(1.05) contrast(1.05);
}

.menu{ display:flex; gap:34px; flex-wrap:wrap }
.menu a{ color:var(--muted) }
.menu a:hover{ color:var(--fg) }

.btn{
  display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px;
  background:var(--accent2); color:#07111c; font-weight:700; border:none; cursor:pointer;
}
.btn.ghost{ background:transparent; color:var(--fg); border:1px solid var(--border) }

/* Mobile nav */
.nav-btn{ display:none; background:transparent; border:0; width:40px; height:40px; cursor:pointer }
.nav-btn .bar{ display:block; width:22px; height:3px; margin:4px auto; background:var(--fg); border-radius:2px }

@media (max-width:768px){
  .nav{ position:relative; justify-content:center; padding:24px }
  .nav-btn{ display:block; position:absolute; left:12px; top:50%; transform:translateY(-50%); z-index:2 }
  .brand{ position:absolute; left:50%; transform:translateX(-50%); margin:0; white-space:nowrap; z-index:1 }
  .menu{
    position:absolute; left:0; right:0; top:100%;
    background:#0c0f14; border-top:1px solid var(--border);
    display:flex; flex-direction:column; gap:0; padding:8px 12px;
    max-height:0; overflow:hidden; transition:max-height .25s ease;
    box-shadow:0 12px 30px rgba(0,0,0,.35); z-index:1;
  }
  .menu a{ display:block; padding:12px 6px; color:var(--fg) }
  .menu.open{ max-height:70vh }
}

/* =========================
   3) CATEGORY CARDS
   ========================= */
.grid-cats{ display:grid; gap:16px; grid-template-columns:repeat(3,1fr) }
.card{
  background:var(--surface); border:1px solid var(--border); border-radius:18px; overflow:hidden;
}
.card img{ width:100%; height:180px; object-fit:cover; display:block }
.card .body{ padding:14px }
.card h3{ margin:0 0 6px }
.muted{ color:var(--muted) }
.section{ padding:28px 0 }

/* =========================
   4) HEROES (image-based)
   ========================= */
.hero{
  position:relative; display:grid; place-items:center; min-height:80vh; isolation:isolate;
  background:url("/assets/img/mountain-trees-lake-rustic.jpg") center/cover no-repeat;
}
.hero::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.25),rgba(0,0,0,.55)); z-index:-1;
}
.hero-inner{ width:min(1100px,92vw); padding:clamp(20px,4vw,64px) }

.hunters-hero,.fishermen-hero,.cooking-hero,.favorites-hero,.knives-tools-hero,.bearded-men-hero{
  position:relative; color:var(--fg); min-height:65vh; padding:140px 0 100px; overflow:hidden;
}
.hunters-hero::before,.fishermen-hero::before,.cooking-hero::before,
.favorites-hero::before,.knives-tools-hero::before,.bearded-men-hero::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.45) 60%, rgba(0,0,0,.65) 100%);
  z-index:0;
}
.hunters-hero .hero-inner,.fishermen-hero .hero-inner,.cooking-hero .hero-inner,
.favorites-hero .hero-inner,.knives-tools-hero .hero-inner,.bearded-men-hero .hero-inner{
  position:relative; z-index:1; max-width:800px; margin:0 auto; text-align:left;
}
.hero-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-1; display:block }
.hunters-hero .hero-img{ object-position:center }
.fishermen-hero .hero-img{ object-position:center 20% }
.cooking-hero .hero-img{ object-position:center 70% }
.favorites-hero .hero-img{ object-position:center 70% }
.knives-tools-hero .hero-img{ object-position:center 70% }
.bearded-men-hero .hero-img{ object-position:center 70% }

/* =========================
   5) PRODUCT GRID + CARDS
   ========================= */
.product-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:24px; align-items:stretch;
  isolation:isolate; /* predictable z-index stacking */
}

.product-card{
  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.02)), var(--card);
  border:1px solid var(--line);
  border-radius:18px; overflow:hidden; color:var(--ink);
  box-shadow:0 6px 20px rgba(0,0,0,.28);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display:flex; flex-direction:column; min-width:0; z-index:0;
}
.product-card:hover{
  transform:translateY(-6px);               /* lift only (no scale to avoid overlap) */
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  border-color:rgba(255,255,255,.12);
  z-index:10;
}

/* Edge guard — hide 1px peeks from neighbors on hover */
.product-card::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  box-shadow: inset 1px 0 0 var(--card), inset -1px 0 0 var(--card);
}

/* Media area (shared) */
.product-media{
  position:relative; width:100%; aspect-ratio: 3 / 4;
  background:radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.06), transparent 60%), #0a1116;
  overflow:hidden;
}
.product-img{ width:100%; height:100%; object-fit:cover; display:block }

/* Content */
.product-body{ padding:16px 16px 18px }
.product-title{ font-size:18px; font-weight:800; line-height:1.2; margin:0 0 6px }
.product-meta{ display:flex; gap:12px; align-items:center; color:var(--muted); font-size:14px; margin-bottom:10px }
.product-price{ color:var(--ink); font-weight:700; letter-spacing:.2px }

/* CTA */
.product-actions{ margin-top:auto; padding:0 16px 16px }

/* =========================
   6) CTA BUTTON (TEXTURED ONLY HERE)
   ========================= */
.btn-primary{
  position:relative; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center;
  width:100%; height:44px;
  background:var(--accent); color:#0b1110; font-weight:800;
  border-radius:12px; border:1px solid rgba(0,0,0,.25);
  text-decoration:none; transition:filter .18s ease, transform .08s ease;
}
.btn-primary:hover{ filter:brightness(1.06); transform:translateY(-1px) }
.btn-primary:active{ transform:translateY(0) }

/* Texture overlay (blended with mint tint) */
.btn-primary::before{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:
    linear-gradient(var(--tx-tint-1), var(--tx-tint-2)),
    var(--tx-url) center/cover no-repeat;
  background-blend-mode:multiply;
  opacity:.38; /* adjust texture strength */
}
.btn-primary:hover::before{ opacity:.48 } /* optional hover emphasis */

/* =========================
   7) CAROUSEL (inside .product-media)
   ========================= */
.carousel{
  position:relative; border-bottom:1px solid rgba(255,255,255,.06);
  user-select:none; -webkit-user-select:none; overflow:hidden;
}
.product-media.carousel{ aspect-ratio:3 / 4; background:radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.06), transparent 60%), #0a1116; overflow:hidden }
.product-media.carousel .slides{
  display:flex; gap:0; width:100%; height:100%;
  touch-action:pan-y; will-change:transform; transition:transform .35s ease;
  backface-visibility:hidden; -webkit-transform:translateZ(0); transform:translateZ(0);
}
.product-media.carousel .product-img{
  flex:0 0 100%; width:100%; height:100%; object-fit:cover; max-height:none; margin-left:0 !important;
}

/* Pagination dots (default) */
.carousel .dots{
  position:absolute; left:50%; transform:translateX(-50%); bottom:12px;
  display:flex; gap:8px; padding:6px 10px;
  background:rgba(0,0,0,.25); border:1px solid rgba(255,255,255,.08);
  border-radius:999px; backdrop-filter:blur(8px) saturate(120%); z-index:2;
}
.carousel .dot{
  width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.45);
  border:0; cursor:pointer; padding:0;
}
.carousel .dot.is-active{ background:var(--accent) }

/* Arrows — minimal icon only (no circle) */
.product-media.carousel .nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:auto; height:auto; background:none !important; border:none !important; box-shadow:none !important;
  font-size:26px; color:rgba(255,255,255,.7); opacity:.5; padding:0 6px; transition:opacity .2s ease;
}
.product-media.carousel .nav:hover{ opacity:1; color:var(--accent) }
.carousel .prev{ left:10px }
.carousel .next{ right:10px }

/* =========================
   8) LIGHTBOX
   ========================= */
.lightbox{
  position:fixed; inset:0; z-index:9999; display:none;
  background:rgba(0,0,0,.85); align-items:center; justify-content:center;
}
.lightbox.is-open{ display:flex }
.lightbox img{
  max-width:92vw; max-height:88vh; object-fit:contain; border-radius:8px;
  box-shadow:0 10px 30px rgba(0,0,0,.6);
}
.lightbox .close,
.lightbox .lb-prev,
.lightbox .lb-next{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%;
  border:1px solid rgba(255,255,255,.2);
  background:rgba(10,12,16,.45); color:#fff; display:grid; place-items:center; cursor:pointer;
}
.lightbox .close{ top:22px; right:22px; transform:none; width:40px; height:40px }
.lightbox .lb-prev{ left:24px }
.lightbox .lb-next{ right:24px }
.lightbox .close:hover,
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover{ background:rgba(10,12,16,.65) }

/* =========================
   9) FOOTER
   ========================= */
footer{ border-top:1px solid var(--border); margin-top:28px }
.foot{
  display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between;
  padding:16px 0; color:var(--muted);
}

/* =========================
   10) RESPONSIVE
   ========================= */

/* Tablets */
@media (max-width:768px){
  /* Category grid */
  .grid-cats{ grid-template-columns:repeat(2, minmax(0,1fr)) }

  /* Product grid: 2-up */
  .product-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:12px; align-items:stretch;
  }

  /* Premium feel */
  .product-media{ aspect-ratio: 3 / 4 }
  .product-title{ font-size:16px }
  .product-body{ padding:12px 12px 14px }
  .btn-primary{ height:42px }

  /* Disable hover lift on touch (visual only preserved) */
  .product-card:hover{ transform:none; box-shadow:0 6px 20px rgba(0,0,0,.28) }

  /* Heroes */
  .hunters-hero,.fishermen-hero,.cooking-hero,.favorites-hero,.knives-tools-hero,.bearded-men-hero{
    min-height:54vh; padding:120px 0 80px;
  }
  .hunters-hero .hero-img,
  .fishermen-hero .hero-img,
  .cooking-hero .hero-img,
  .favorites-hero .hero-img,
  .knives-tools-hero .hero-img,
  .bearded-men-hero .hero-img{ object-position:center 30% }
  .knives-tools-hero{ min-height:50vh }

  /* Carousel: hide arrows on mobile (tap/drag + dots are enough) */
  .carousel .nav{ display:none }
}

/* Phones (keep 2-up, slightly tighter) */
@media (max-width:480px){
  .product-grid{ grid-template-columns: repeat(2, minmax(160px,1fr)); gap:10px }
}

/* =========================
   11) MOBILE POLISH (DOTS + BUTTON)
   ========================= */
@media (max-width:480px){
  /* Minimal dash pagination style */
  .product-media.carousel .dots{
    bottom:12px; padding:4px 10px; gap:6px;
    background:rgba(0,0,0,.22); border:1px solid rgba(255,255,255,.07);
    border-radius:999px; backdrop-filter:blur(6px) saturate(120%);
  }
  .product-media.carousel .dot{
    width:14px; height:3px; border-radius:4px; /* dash shape */
    background:rgba(255,255,255,.45); opacity:.75;
    transition:transform .18s ease, background-color .18s ease, opacity .18s ease;
  }
  .product-media.carousel .dot.is-active{
    background:var(--accent); opacity:1; transform:scale(1.25);
    box-shadow:0 0 4px rgba(0,0,0,.4);
  }

  /* Button polish */
  .product-actions{ padding:0 14px 14px }
  .product-body{ padding:14px }
  .btn-primary{
    height:42px; font-size:12px; white-space:nowrap; border-radius:10px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.28); letter-spacing:.2px;
  }
}
