/* noal-shop.css
   Drop-in enhancements for existing "work/gallery" markup:
   - filter pills active state
   - overlay buttons row
   - hover overlay only on desktop; mobile uses tap -> modal
   - cart drawer + checkout modal
   - CSS variables theme (auto-set by JS)
*/

:root{
  --noal-bg: #ffffff;
  --noal-surface: rgba(255,255,255,.78);
  --noal-surface-solid: #ffffff;
  --noal-text: #111111;
  --noal-muted: rgba(17,17,17,.70);
  --noal-border: rgba(0,0,0,.12);
  --noal-accent: #111111;
  --noal-accent-contrast: #ffffff;
  --noal-shadow: 0 12px 40px rgba(0,0,0,.12);
  --noal-radius: 16px;
  --noal-radius-pill: 999px;
  --noal-blur: 10px;
}

:root[data-noal-theme="dark"]{
  --noal-bg: #0f1115;
  --noal-surface: rgba(20,22,28,.72);
  --noal-surface-solid: #14161c;
  --noal-text: #f4f6fb;
  --noal-muted: rgba(244,246,251,.74);
  --noal-border: rgba(255,255,255,.14);
  --noal-accent: #f4f6fb;
  --noal-accent-contrast: #0f1115;
  --noal-shadow: 0 16px 60px rgba(0,0,0,.35);
}

#work .content, #work .content p, #work .content h2, #work .content .header-details, #work .content .lead{
  color: var(--noal-text);
}

/* Filter pills */
#work .gallery .filter .nav li a{
  display:inline-block;
  padding: 8px 12px;
  border-radius: var(--noal-radius-pill);
  border: 1px solid var(--noal-border);
  background: var(--noal-surface);
  backdrop-filter: blur(var(--noal-blur));
  -webkit-backdrop-filter: blur(var(--noal-blur));
  color: var(--noal-text) !important;
  text-decoration:none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
#work .gallery .filter .nav li a:hover{
  transform: translateY(-1px);
  background: rgba(0,0,0,.04);
}
:root[data-noal-theme="dark"] #work .gallery .filter .nav li a:hover{
  background: rgba(255,255,255,.06);
}
#work .gallery .filter .nav li a.active{
  background: rgba(0,0,0,.10);
  border-color: rgba(0,0,0,.22);
}
:root[data-noal-theme="dark"] #work .gallery .filter .nav li a.active{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
}

/* Card */
#work .gallery .grid .item > a{
  border-radius: var(--noal-radius);
  overflow:hidden;
  box-shadow: var(--noal-shadow);
  display:block;
}

/* Softer image transform (desktop hover only) */
@media (hover:hover) and (pointer:fine){
  #work .hover-overlay:hover img{
    transform: scale(1.08) rotate(0deg) !important;
  }
}

/* Overlay: desktop hover only */
#work .hover-overlay .overlay{
  opacity:0;
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.72)) !important;
  transition: opacity .25s ease;
}
@media (hover:hover) and (pointer:fine){
  #work .hover-overlay:hover .overlay{ opacity:1; }
  #work .hover-overlay .overlay:hover{ opacity:1; }
}
@media (hover:none), (pointer:coarse){
  #work .hover-overlay .overlay{ display:none !important; }
}

/* Overlay typography */
#work .hover-overlay .overlay,
#work .hover-overlay .overlay p,
#work .hover-overlay .overlay .title,
#work .hover-overlay .overlay strong,
#work .hover-overlay .overlay i{
  color:#fff !important;
}

/* Buttons row inside overlay */
.noal-overlay-actions{
  display:flex;
  gap:8px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  margin-top:10px;
}
.noal-btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.16);
  color:#fff;
  padding:10px 12px;
  border-radius: var(--noal-radius-pill);
  font-weight:700;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size:11px;
  line-height: 1;
  cursor:pointer;
  backdrop-filter: blur(var(--noal-blur));
  -webkit-backdrop-filter: blur(var(--noal-blur));
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.noal-btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.40); }
.noal-btn:active{ transform: translateY(0px); }
.noal-btn.noal-btn-solid{
  background: rgba(255,255,255,.92);
  color:#111;
  border-color: rgba(255,255,255,.92);
}
.noal-btn.noal-btn-solid:hover{ background:#fff; border-color:#fff; }

/* ====== Modals ====== */
.noal-modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 999999;
  display:none;
}
.noal-modal-backdrop.show{ display:block; }

.noal-modal{
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display:none;
  padding: 20px;
  overflow:auto;
}
.noal-modal.show{ display:block; }

.noal-modal-card{
  max-width: 860px;
  margin: 40px auto;
  background: var(--noal-surface-solid);
  color: var(--noal-text);
  border-radius: calc(var(--noal-radius) + 6px);
  box-shadow: var(--noal-shadow);
  border: 1px solid var(--noal-border);
  overflow:hidden;
}

.noal-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--noal-border);
  background: var(--noal-surface);
  backdrop-filter: blur(var(--noal-blur));
  -webkit-backdrop-filter: blur(var(--noal-blur));
}
.noal-modal-title{
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
  margin:0;
}
.noal-x{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--noal-border);
  background: transparent;
  color: var(--noal-text);
  cursor:pointer;
  font-size: 22px;
  line-height: 1;
}
.noal-x:hover{ background: rgba(0,0,0,.04); }
:root[data-noal-theme="dark"] .noal-x:hover{ background: rgba(255,255,255,.06); }

.noal-modal-body{
  display:grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  padding: 16px;
}
@media (max-width: 860px){
  .noal-modal-body{ grid-template-columns: 1fr; }
}

.noal-modal-media{
  border-radius: var(--noal-radius);
  overflow:hidden;
  border: 1px solid var(--noal-border);
  background: rgba(0,0,0,.03);
}
.noal-modal-media img{ width:100%; height:auto; display:block; }
.noal-modal-content h3{
  margin: 0 0 10px 0;
  font-size: 18px;
  line-height: 1.25;
  text-transform:none;
  text-align:left;
}
.noal-muted{ color: var(--noal-muted); }

.noal-product-price{
  display:inline-flex;
  align-items:baseline;
  gap:8px;
  margin: 6px 0 12px;
  padding: 8px 12px;
  border-radius: var(--noal-radius-pill);
  border: 1px solid var(--noal-border);
  background: var(--noal-surface);
  color: var(--noal-text);
  font-weight: 800;
  letter-spacing: .2px;
}
.noal-product-price span{
  color: var(--noal-muted);
  font-weight: 700;
}
.noal-product-price strong{
  color: var(--noal-text);
  font-size: 18px;
}

.noal-actions-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.noal-actions-row .noal-primary,
.noal-actions-row .noal-secondary{
  appearance:none;
  border-radius: var(--noal-radius-pill);
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 12px;
  cursor:pointer;
  border: 1px solid var(--noal-border);
  background: transparent;
  color: var(--noal-text);
}
.noal-actions-row .noal-primary{
  background: var(--noal-accent);
  color: var(--noal-accent-contrast);
  border-color: var(--noal-accent);
}
.noal-actions-row .noal-primary:hover{ transform: translateY(-1px); }
.noal-actions-row .noal-secondary:hover{ background: rgba(0,0,0,.04); }
:root[data-noal-theme="dark"] .noal-actions-row .noal-secondary:hover{ background: rgba(255,255,255,.06); }

/* ====== Cart UI ====== */
.noal-cart-fab{
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 1000001;
  border-radius: 999px;
  border: 1px solid var(--noal-border);
  background: var(--noal-surface);
  backdrop-filter: blur(var(--noal-blur));
  -webkit-backdrop-filter: blur(var(--noal-blur));
  color: var(--noal-text);
  padding: 12px 14px;
  box-shadow: var(--noal-shadow);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 12px;
}
.noal-cart-badge{
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  font-weight: 900;
  background: var(--noal-accent);
  color: var(--noal-accent-contrast);
  padding: 0 7px;
}

/* Cart drawer */
.noal-drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100%;
  background: var(--noal-surface-solid);
  border-left: 1px solid var(--noal-border);
  box-shadow: var(--noal-shadow);
  z-index: 1000002;
  transform: translateX(102%);
  transition: transform .25s ease;
  display:flex;
  flex-direction: column;
}
.noal-drawer.show{ transform: translateX(0); }

.noal-drawer-head{
  padding: 14px 16px;
  border-bottom: 1px solid var(--noal-border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.noal-drawer-head strong{
  text-transform: uppercase;
  letter-spacing: .8px;
}
.noal-drawer-body{
  padding: 12px 16px;
  overflow:auto;
  flex:1;
}
.noal-cart-item{
  display:flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--noal-border);
}
.noal-cart-item img{
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--noal-border);
}
.noal-cart-item .meta{ flex:1; }
.noal-cart-item .name{
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  margin-bottom: 4px;
}
.noal-qty{
  display:flex;
  gap: 8px;
  align-items:center;
  margin-top: 8px;
}
.noal-qty button{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--noal-border);
  background: transparent;
  cursor:pointer;
  color: var(--noal-text);
}
.noal-qty button:hover{ background: rgba(0,0,0,.04); }
:root[data-noal-theme="dark"] .noal-qty button:hover{ background: rgba(255,255,255,.06); }

.noal-drawer-foot{
  padding: 14px 16px;
  border-top: 1px solid var(--noal-border);
  display:flex;
  gap: 10px;
}
.noal-drawer-foot button{
  flex:1;
}

/* Checkout form */
.noal-form{
  display:grid;
  gap: 10px;
  padding: 16px;
}
.noal-form label{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.noal-form input, .noal-form textarea{
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--noal-border);
  padding: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--noal-text);
  outline: none;
}
.noal-form input:focus, .noal-form textarea:focus{
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
:root[data-noal-theme="dark"] .noal-form input:focus,
:root[data-noal-theme="dark"] .noal-form textarea:focus{
  box-shadow: 0 0 0 3px rgba(255,255,255,.10);
}

.noal-toast{
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 1000003;
  background: var(--noal-surface-solid);
  border: 1px solid var(--noal-border);
  box-shadow: var(--noal-shadow);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.noal-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}


/* ===== NOAL additions: product modal layout + mobile hover disable ===== */
.noal-modal-body{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 520px){
  .noal-modal-body{
    grid-template-columns: 1fr;
  }
}

.noal-modal-media-square{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--noal-border, rgba(0,0,0,.12));
  background: var(--noal-surface, rgba(255,255,255,.75));
}
.noal-modal-media-square img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.noal-modal-controls{ margin-top: 10px; }

.noal-qty{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--noal-border, rgba(0,0,0,.12));
  background: var(--noal-surface, rgba(255,255,255,.75));
}
.noal-qty-btn{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--noal-border, rgba(0,0,0,.12));
  background: var(--noal-card, rgba(255,255,255,.9));
  color: var(--noal-text, #111);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.noal-qty-input{
  width: 64px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--noal-border, rgba(0,0,0,.12));
  background: var(--noal-card, rgba(255,255,255,.9));
  color: var(--noal-text, #111);
  text-align: center;
  font-weight: 700;
  padding: 0 6px;
}

/* mobile: disable hover-only effects */
@media (hover: none), (pointer: coarse){
  .hover-overlay:hover img{
    transform: none !important;
  }
  .hover-overlay .overlay{
    opacity: 0 !important;
  }
}
