/* =========================================================
   Pebble Island — Boutique Fashion (Light Theme)
   Inspired by: Next / River Island / Primark
   Mobile-first • SEO-friendly • Product-led
   ========================================================= */

/* -----------------------
   CSS Variables (Brand)
------------------------ */
:root{
  /* Light boutique base */
  --bg:#FAFAF8;
  --panel:#FFFFFF;
  --panel-soft:#F2F4F2;

  /* Text */
  --text:#0F1412;
  --muted:#5F6B66;

  /* Lines / borders */
  --stroke:rgba(0,0,0,.08);

  /* Brand accents (from logo) */
  --teal:#189372;
  --teal2:#1C6C54;
  --yellow:#F3EA16;

  /* UI */
  --radius:18px;
  --radius-sm:12px;
  --shadow:0 20px 50px rgba(0,0,0,.08);
  --max:1180px;
}

/* -----------------------
   Reset / Base
------------------------ */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(24,147,114,.08), transparent 60%),
    radial-gradient(900px 600px at 90% -10%, rgba(243,234,22,.10), transparent 55%),
    var(--bg);
  color:var(--text);
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.container{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:0 16px;
}

/* -----------------------
   Top strip (offers/help)
------------------------ */
.topstrip{
  background:var(--panel-soft);
  border-bottom:1px solid var(--stroke);
  font-size:12px;
}
.topstrip-inner{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  padding:10px 0;
  color:var(--muted);
}
.topstrip .sep{ opacity:.5; }
.toplink{
  text-decoration:underline;
  text-underline-offset:2px;
}

/* -----------------------
   Header
------------------------ */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--stroke);
}

.header-inner{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  padding:14px 0 10px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:center;
}
.brand-logo{
  width:42px;
  height:42px;
  border-radius:999px;
  object-fit:cover;
}
.brand-text{
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:13px;
}

/* Search */
.search{
  display:flex;
  gap:8px;
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:999px;
  padding:6px;
}
.search input{
  flex:1;
  border:0;
  background:transparent;
  padding:10px 12px;
  font-size:14px;
  outline:none;
}
.search button{
  border:0;
  border-radius:999px;
  padding:10px 14px;
  background:var(--panel-soft);
  font-weight:700;
  cursor:pointer;
}
.search button:hover{
  background:#e7ebe8;
}

/* Header actions */
.header-actions{
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.iconlink{
  font-size:13px;
}
.count{
  margin-left:6px;
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(24,147,114,.10);
  color:var(--teal);
}

/* -----------------------
   Desktop mega nav
------------------------ */
.mega-nav{
  display:none;
  border-top:1px solid var(--stroke);
}
.mega-inner{
  display:flex;
  gap:20px;
  padding:12px 0;
}
.mega-inner a{
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:700;
  padding:8px 10px;
}
.mega-inner a.active{
  color:var(--teal);
}

/* -----------------------
   Mobile bottom nav
------------------------ */
.mobilebar{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:60;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  background:rgba(255,255,255,.96);
  border-top:1px solid var(--stroke);
}
.mitem{
  padding:12px 6px;
  text-align:center;
  font-size:12px;
}
.mitem.active{
  color:var(--teal);
}

.main{
  padding-bottom:74px;
}

/* -----------------------
   Sections
------------------------ */
.section{
  padding:22px 0;
}

.section-title{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:12px;
}
.section-title h2{
  margin:0;
  font-size:18px;
}
.section-title a{
  font-size:13px;
  text-decoration:underline;
  text-underline-offset:3px;
  color:var(--muted);
}

/* -----------------------
   Hero
------------------------ */
.hero-card{
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.hero h1{
  margin:0 0 10px;
  font-size:28px;
  line-height:1.05;
}
.hero p{
  margin:0 0 14px;
  color:var(--muted);
}
.hero-cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* -----------------------
   Buttons
------------------------ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  font-weight:800;
  cursor:pointer;
}

.btn.primary{
  background:var(--teal);
  border-color:var(--teal);
  color:#fff;
}
.btn.primary:hover{
  background:var(--teal2);
}

.btn.secondary{
  background:var(--panel);
}
.btn.secondary:hover{
  background:var(--panel-soft);
}

/* -----------------------
   Category tiles
------------------------ */
.tiles{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

.tile{
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}
.tile .tag{
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}
.tile .name{
  font-size:20px;
  font-weight:900;
  margin-top:10px;
}
.tile .go{
  margin-top:10px;
  font-size:13px;
  text-decoration:underline;
  text-underline-offset:3px;
}

/* -----------------------
   Product grid
------------------------ */
.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}

.card{
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:var(--radius-sm);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.ph{
  aspect-ratio:4/5;
  background:#E9ECE9;
}
.card .meta{
  padding:12px;
}
.card .name{
  font-size:13px;
  font-weight:700;
}
.card .price{
  margin-top:6px;
}
.card .price strong{
  color:var(--teal);
}

/* -----------------------
   Footer
------------------------ */
.footer{
  margin-top:30px;
  background:var(--panel-soft);
  border-top:1px solid var(--stroke);
}

.footer-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  padding:24px 0;
}

.footer-title{
  font-weight:800;
  margin-bottom:6px;
}

.footer a{
  display:block;
  padding:6px 0;
  color:var(--muted);
}

.footer-brand{
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.footer-bottom{
  padding:14px 0 84px;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:var(--muted);
}

/* -----------------------
   Desktop enhancements
------------------------ */
@media (min-width:860px){
  .header-inner{
    grid-template-columns:260px 1fr 320px;
    align-items:center;
  }
  .brand{ justify-content:flex-start; }
  .header-actions{ justify-content:flex-end; }

  .mega-nav{ display:block; }
  .mobilebar{ display:none; }
  .main{ padding-bottom:0; }

  .tiles{ grid-template-columns:repeat(3,1fr); }
  .grid{ grid-template-columns:repeat(4,1fr); }

  .footer-grid{
    grid-template-columns:1.6fr 1fr 1fr 1.2fr;
  }
  .footer-bottom{ padding-bottom:18px; }

  .hero-card{ padding:28px; }
  .hero h1{ font-size:44px; }
}

/* =========================================================
   LISTING (Sidebar Filters + Grid)
   ========================================================= */

.h1{ margin:0; font-size:26px; letter-spacing:-.02em; }
.listing-top{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:14px;
}
.listing-actions{ display:flex; gap:10px; align-items:center; }

.sort{
  display:flex;
  gap:8px;
  align-items:center;
}
.sort select{
  border:1px solid var(--stroke);
  background:var(--panel);
  border-radius:12px;
  padding:10px 12px;
  font-weight:700;
}

.listing{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
}

.filters{
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.filters-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 14px;
  border-bottom:1px solid var(--stroke);
}
.filters-title{ font-weight:900; letter-spacing:.08em; text-transform:uppercase; font-size:12px; }
.filters .x{
  border:1px solid var(--stroke);
  background:var(--panel-soft);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
}

.filters-form{ padding:14px; display:grid; gap:14px; }

.fblock{ display:grid; gap:10px; }
.flabel{ font-weight:900; font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }

.fin{
  width:100%;
  border:1px solid var(--stroke);
  background:var(--panel);
  border-radius:12px;
  padding:12px 12px;
  font-size:14px;
}

.chk{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 8px;
  border-radius:12px;
}
.chk input{ width:16px; height:16px; }
.chk:hover{ background:var(--panel-soft); }

.priceRow{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }

.factions{ display:grid; gap:10px; }
.factions .btn{ width:100%; }

.active-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}
.chip{
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--panel);
  color:var(--muted);
}

.listing-grid .ph{
  background:#E9ECE9;
}

/* Pagination */
.pager{
  margin-top:16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid var(--stroke);
  border-radius:14px;
  background:var(--panel);
}
.pbtn{
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:12px;
  background:var(--panel-soft);
  font-weight:900;
}
.pbtn[aria-disabled="true"]{
  opacity:.45;
  pointer-events:none;
}

/* Mobile filter drawer behaviour */
.filterBtn{ width:auto; }
@media (max-width: 859px){
  .filters{
    position:fixed;
    left:0; top:0; bottom:0;
    width:min(420px, 92vw);
    z-index:80;
    transform: translateX(-110%);
    transition: transform .18s ease;
    border-radius: 0 18px 18px 0;
  }
  body.filtersOpen .filters{ transform: translateX(0); }

  body.filtersOpen:before{
    content:"";
    position:fixed; inset:0;
    background:rgba(0,0,0,.22);
    z-index:70;
  }
}

/* Desktop: sticky sidebar + 2-column layout */
@media (min-width: 860px){
  .listing{
    grid-template-columns: 320px 1fr;
    align-items:start;
  }
  .filters{
    position:sticky;
    top:140px; /* under sticky header */
  }
  .filters .x{ display:none; }
}

/* =========================================================
   PDP (Product Page)
   ========================================================= */

.notice{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:var(--panel);
  margin-bottom:14px;
}
.notice.ok{ border-color: rgba(24,147,114,.25); }
.notice.error{ border-color: rgba(220,50,50,.20); }
.notice .u{ text-decoration:underline; text-underline-offset:3px; color: var(--teal); }

.pdp{
  display:grid;
  grid-template-columns: 1fr;
  gap:18px;
  align-items:start;
}

.gallery{
  background:transparent;
}
.mainimg{
  width:100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: #E9ECE9;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.thumbs{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:10px;
}
.thumb{
  border:1px solid var(--stroke);
  border-radius: 14px;
  aspect-ratio: 1/1;
  background:#E9ECE9;
  background-size: cover;
  background-position: center;
  cursor:pointer;
}
.thumb:hover{ outline: 2px solid rgba(24,147,114,.18); outline-offset:2px; }

.buybox{
  background: var(--panel);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.crumbs{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:12px;
  color: var(--muted);
  margin-bottom:10px;
}
.crumbs a{ text-decoration:underline; text-underline-offset:3px; }

.pname{
  margin:0 0 10px;
  font-size: 24px;
  letter-spacing: -.02em;
}

.priceRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:baseline;
  padding-bottom:10px;
  border-bottom:1px solid var(--stroke);
  margin-bottom:12px;
}
.price{
  font-size:22px;
  font-weight:900;
}
.was{
  font-size:14px;
  color: var(--muted);
  text-decoration: line-through;
}
.stock{
  margin-left:auto;
  font-size:12px;
  font-weight:800;
  color: var(--teal);
}

.buyform{ display:grid; gap:14px; }

.optlabel{
  font-weight:900;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: var(--muted);
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:8px;
}

.chipBtn{
  border:1px solid var(--stroke);
  background: var(--panel);
  border-radius: 999px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
}
.chipBtn:hover{ background: var(--panel-soft); }
.chipBtn.active{
  border-color: rgba(24,147,114,.35);
  background: rgba(24,147,114,.10);
  color: var(--teal2);
}
.chipBtn.disabled{
  opacity:.45;
  cursor:not-allowed;
  text-decoration: line-through;
}

.qtyRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
#qty{
  border:1px solid var(--stroke);
  background: var(--panel);
  border-radius: 12px;
  padding:10px 12px;
  font-weight:800;
}

.addBtn{ width:100%; }
.addBtn:disabled{ opacity:.55; cursor:not-allowed; }

.metaSmall{
  display:grid;
  gap:6px;
  font-size:13px;
  color: var(--muted);
}

.desc{
  padding-top: 8px;
}
.desc h2{
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.desc p{
  margin:0;
  color: var(--muted);
  line-height:1.6;
}

.policy{
  display:grid;
  gap:10px;
  padding-top: 10px;
  border-top:1px solid var(--stroke);
}
.pol{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:13px;
}

/* Desktop */
@media (min-width: 860px){
  .pdp{
    grid-template-columns: 1.25fr 1fr;
    gap:22px;
  }
  .buybox{
    position: sticky;
    top: 140px;
  }
  .thumbs{ grid-template-columns: repeat(6, 1fr); }
  .pname{ font-size: 30px; }
  .price{ font-size: 26px; }
}

