@import url('https://fonts.googleapis.com/css?family=Raleway:400,600,700,800&display=swap');

/* =========================
   Theme variables (auto-set by JS)
   ========================= */
:root{
  --bg: #ffffff;
  --surface: rgba(255,255,255,.78);
  --surface-strong: rgba(255,255,255,.92);
  --text: #111111;
  --text-muted: rgba(0,0,0,.65);
  --border: rgba(0,0,0,.14);
  --shadow: 0 18px 60px rgba(0,0,0,.18);
  --accent: #0b5cff;
  --accent-contrast: #ffffff;
  --overlay: linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.72));
  --radius: 16px;
}

/* Light/Dark hook (optional) */
html[data-theme="dark"]{
  --bg: #0f1115;
  --surface: rgba(18,20,26,.68);
  --surface-strong: rgba(18,20,26,.92);
  --text: #f2f4f8;
  --text-muted: rgba(255,255,255,.70);
  --border: rgba(255,255,255,.12);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --accent: #4aa3ff;
  --accent-contrast: #081018;
  --overlay: linear-gradient(to bottom, rgba(0,0,0,.20), rgba(0,0,0,.80));
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family: Raleway, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== Topbar ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar__inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.brand{font-weight:800; letter-spacing: .06em; text-transform: uppercase;}

.cart-fab{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  cursor:pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
}
.cart-fab__count{
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  padding: 0 8px;
}

/* ===== Basic layout helpers (Bootstrap-like) ===== */
.container{max-width:1100px; margin:0 auto; padding:0 14px;}
.container-fluid{width:100%; padding:0 14px;}
.row{display:block;}
.grid{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  padding: 8px 0 18px;
}
.item{
  width: calc(25% - 9px);
}
@media (max-width: 991px){.item{width: calc(33.333% - 8px);} }
@media (max-width: 767px){.item{width: calc(50% - 6px);} }
@media (max-width: 420px){.item{width: 100%;} }

/* ===== Section styles (minimal) ===== */
#work .view{position:relative; overflow:hidden;}
#work .bg{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:saturate(0.9) contrast(1.02); opacity:.28; pointer-events:none;}
#work .content{position:relative; padding: 46px 0 0;}
#work h2{
  margin: 0 0 8px;
  text-align:center;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .06em;
}
#work .highlight{color: #cb875f;}
#work .header-details{margin:0 0 22px; text-align:center; font-weight:700; color: var(--text-muted);}
#work .lead{
  margin: 0 auto 24px;
  max-width: 900px;
  text-align:center;
  color: var(--text);
  line-height: 1.6;
}

/* ===== Filter ===== */
.gallery .filter{padding: 10px 0 4px; text-align:center;}
.gallery .filter ul{list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:10px; justify-content:center;}
.gallery .filter a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
  text-decoration:none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.gallery .filter a:hover{background: rgba(0,0,0,.05);}
html[data-theme="dark"] .gallery .filter a:hover{background: rgba(255,255,255,.06);}
.gallery .filter a.is-active{border-color: rgba(11,92,255,.55); box-shadow: 0 10px 28px rgba(11,92,255,.18);}

/* ===== Card / Overlay ===== */
.hover-overlay{
  position:relative;
  display:block;
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0,0,0,.10);
}
.hover-overlay img{display:block; width:100%; height:auto; transition: transform .35s ease;}

.overlay{
  position:absolute;
  inset:0;
  opacity:0;
  transition: opacity .25s ease;
  background: var(--overlay);
}
.overlay > div{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding: 14px 14px 12px;
  transform: translateY(8px);
  transition: transform .25s ease;
}
.overlay .title{margin:0 0 6px; font-weight:800; letter-spacing:.02em;}
.overlay p{margin:0 0 6px; color: rgba(255,255,255,.92); font-size: 12px; line-height: 1.35;}
.overlay strong{color:#fff;}

/* Action row inside overlay */
.overlay .actions{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}

.btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  color:#fff;
  border-radius: 999px;
  padding: 9px 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
  user-select:none;
}
.btn:hover{background: rgba(255,255,255,.22); transform: translateY(-1px);}
.btn:active{transform:none;}
.btn--primary{background: rgba(11,92,255,.92); border-color: rgba(11,92,255,.92); color: var(--accent-contrast);}
.btn--primary:hover{background: rgba(11,92,255,1);}
.btn--ghost{background: rgba(255,255,255,.10);}

/* Desktop hover only */
@media (hover: hover) and (pointer: fine){
  .hover-overlay:hover img{transform: scale(1.06);} 
  .hover-overlay:hover .overlay{opacity:1;}
  .hover-overlay:hover .overlay > div{transform: translateY(0);} 
}

/* Mobile: disable hover overlay, show subtle badge via JS (optional) */
@media (hover: none), (pointer: coarse){
  .overlay{display:none !important;}
}

/* Hidden items for filtering */
.item.is-hidden{display:none !important;}

/* ====== Drawer / Cart ====== */
.drawer{
  position: fixed;
  inset: 0;
  z-index: 80;
  display:none;
}
.drawer.is-open{display:block;}
.drawer__backdrop{position:absolute; inset:0; background: rgba(0,0,0,.45);}
.drawer__panel{
  position:absolute;
  top:0;
  right:0;
  height:100%;
  width: min(420px, 92vw);
  background: var(--surface-strong);
  color: var(--text);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display:flex;
  flex-direction:column;
}
.drawer__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer__title{font-weight:800; text-transform:uppercase; letter-spacing:.06em;}
.drawer__close{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
}
.drawer__body{padding: 12px 14px; overflow:auto; flex:1;}
.drawer__footer{padding: 14px; border-top: 1px solid var(--border);}

.cart-item{
  display:grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  margin-bottom: 10px;
}
html[data-theme="dark"] .cart-item{background: rgba(0,0,0,.18);}
.cart-item__img{width:64px; height:64px; border-radius: 12px; object-fit:cover;}
.cart-item__name{font-weight:800; margin:0 0 4px;}
.cart-item__meta{font-size:12px; color: var(--text-muted); margin:0 0 8px;}
.cart-item__controls{display:flex; flex-wrap:wrap; gap: 8px; align-items:center;}
.qty{
  display:inline-flex;
  align-items:center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow:hidden;
}
.qty button{
  border:none;
  background: transparent;
  padding: 8px 10px;
  cursor:pointer;
  color: var(--text);
}
.qty input{
  width: 44px;
  border:none;
  text-align:center;
  font-weight: 800;
  background: transparent;
  color: var(--text);
}

.btn-primary{
  width:100%;
  border:none;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 900;
  border-radius: 14px;
  padding: 12px 14px;
  cursor:pointer;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.btn-ghost{
  width:100%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 800;
  border-radius: 14px;
  padding: 12px 14px;
  cursor:pointer;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.cart-summary{display:flex; justify-content:space-between; align-items:center; margin-bottom: 10px; color: var(--text-muted); font-size: 12px;}

/* ===== Modal (product + checkout) ===== */
.modal{position: fixed; inset:0; z-index: 90; display:none;}
.modal.is-open{display:block;}
.modal__backdrop{position:absolute; inset:0; background: rgba(0,0,0,.52);}
.modal__panel{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  width: min(720px, 92vw);
  max-height: 86vh;
  overflow:auto;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.modal__close{
  position: sticky;
  top: 0;
  float:right;
  margin: 10px 10px 0 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
}
.modal__body{padding: 12px 16px 16px;}
.modal__title{margin: 6px 0 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em;}

.product-modal{display:grid; grid-template-columns: 1.1fr .9fr; gap: 14px;}
@media (max-width: 767px){.product-modal{grid-template-columns: 1fr;}}
.product-modal__img{width:100%; border-radius: 16px; border:1px solid var(--border);}
.product-modal__desc{color: var(--text-muted); line-height: 1.6;}
.product-modal__actions{display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px;}
.product-modal__actions .btn-primary{width:auto;}
.product-modal__actions .btn-ghost{width:auto;}

.form-row{display:flex; flex-direction:column; gap:6px; margin: 10px 0;}
label{font-weight:800; letter-spacing: .03em; text-transform: uppercase; font-size: 12px;}
input, textarea{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
}
html[data-theme="dark"] input, html[data-theme="dark"] textarea{background: rgba(0,0,0,.18);}
textarea{min-height: 110px; resize: vertical;}

.form-actions{display:flex; gap:10px; margin-top: 12px;}
.form-actions .btn-primary, .form-actions .btn-ghost{width: auto; flex:1;}
.form-status{margin-top: 10px; font-weight: 700;}

/* Utility */
.hidden-xs{display:block;}
@media (max-width: 767px){.hidden-xs{display:none;}}
.text-center{text-align:center;}

