:root{
  --bg:#f7f9fc;
  --panel:#ffffff;
  --text:#1f2937;         /* slate-800 */
  --muted:#6b7280cc;      /* slate-500 with alpha */
  --brand:#2563eb;        /* blue-600 */
  --accent:#16a34a;       /* green-600 */
  --danger:#dc2626;       /* red-600 */
  --card:#ffffff;
  --border:#e5e7eb;       /* gray-200 */
}

/* hard reset background images (prevents watermark “double page”) */
html, body{
  margin:0; padding:0;
  background:var(--bg) !important;
  color:var(--text);
  font:16px/1.55 system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-image:none !important;
}

/* ===== Layout helpers ===== */
.wrap{ max-width:1100px; margin:0 auto; padding:0 16px; }
.container{ max-width:1100px; margin:0 auto; padding:20px; }
.muted{ color:#64748b; opacity:.95; }
.page-title{ margin:24px 0 10px 0; letter-spacing:.2px; }
.small{ font-size:12px; color:#94a3b8; }
.link{ color:inherit; text-decoration:none; }
.link.danger{ color:var(--danger); background:transparent; border:0; cursor:pointer; }

/* ===== Header / Nav (light) ===== */
.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--panel);
  backdrop-filter:saturate(1.1) blur(6px);
  border-bottom:1px solid var(--border);
}
.site-header .wrap{
  height:64px; display:flex; gap:16px; align-items:center; justify-content:space-between;
}
.brand{ display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; }
.brand-logo{ width:38px; height:38px; object-fit:contain; }
.brand-text{ line-height:1.1; }
.brand-title{ font-weight:700; letter-spacing:.2px; }
.brand-sub{ font-size:12px; color:#64748b; }

.main-nav a{
  color:#0f172a; opacity:.9; text-decoration:none;
  margin-left:8px; padding:8px 12px; border-radius:10px;
  transition:background .15s, opacity .15s, color .15s;
}
.main-nav a:hover{ opacity:1; background:#e5efff; color:#0b3fd6; }
.main-nav a.active{ background:#dbeafe; color:#0b3fd6; }

/* (legacy header classes kept just in case) */
.site{ background:var(--panel); border-bottom:1px solid var(--border); }
.site .container{ display:flex; gap:16px; align-items:center; justify-content:space-between; }
.nav a{ color:#334155; text-decoration:none; margin-left:16px; }
.nav a:hover{ color:#0b3fd6; }

/* ===== Buttons / Inputs ===== */
.btn{
  display:inline-flex; align-items:center; gap:8px; cursor:pointer;
  border:1px solid var(--brand); color:#0b3fd6;
  background:#fff; padding:10px 14px; border-radius:10px;
  box-shadow:0 1px 0 #e5e7eb, 0 1px 2px rgba(0,0,0,.03);
}
.btn:hover{ background:#eff6ff; }
.input{
  width:100%; padding:10px 12px; border-radius:10px;
  border:1px solid var(--border); background:#fff; color:var(--text);
}

/* ===== Search ===== */
.search{ display:flex; gap:10px; margin:14px 0 22px 0; }
.search input{
  flex:1; min-width:180px; padding:12px 14px;
  border-radius:10px; border:1px solid var(--border);
  background:#fff; color:var(--text);
}
.search button{
  padding:12px 16px; border-radius:10px;
  border:1px solid var(--brand); background:#fff;
  color:#0b3fd6; cursor:pointer;
}
.search button:hover{ background:#eff6ff; }

.empty{ color:#64748b; margin:16px 0 30px; }

/* ===== Grid of cards ===== */
.grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
@media (max-width:1000px){ .grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:700px){ .grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:460px){ .grid{ grid-template-columns:1fr; } }

.card{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:14px; overflow:hidden;
  display:flex; flex-direction:column;
  box-shadow:0 1px 0 #e5e7eb, 0 1px 2px rgba(0,0,0,.03);
}
.card img{
  width:100%; aspect-ratio:4/3;
  object-fit:cover; background:#f1f5f9;
}
.card .pad{ padding:12px; }
.card h3{ margin:4px 0 6px 0; font-size:16px; color:#0f172a; }
.card .meta{
  color:#64748b; font-size:12px;
  display:flex; gap:6px; flex-wrap:wrap; align-items:center;
}
.card .price{ margin-top:8px; font-weight:700; color:#0b3fd6; }
.badge{
  display:inline-block; padding:2px 8px; border-radius:999px;
  background:#ecfdf5; border:1px solid #bbf7d0;
  color:#166534; font-size:11px;
}

/* ===== Product page ===== */
.product{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:24px;
  border:1px solid var(--border);
  background:var(--card);
  border-radius:14px;
  padding:16px;
  box-shadow:0 1px 0 #e5e7eb, 0 1px 2px rgba(0,0,0,.03);
}
@media (max-width:820px){ .product{ grid-template-columns:1fr; } }
.product .img img{
  width:100%; aspect-ratio:4/3;
  object-fit:cover; border-radius:12px; background:#f1f5f9;
}
.product .pad h2{ margin:8px 0 6px; color:#111827; }
.meta{
  color:#64748b; font-size:13px;
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
  margin-bottom:10px;
}
.price{ font-size:22px; font-weight:700; margin:10px 0 14px; color:#0b3fd6; }

/* ===== Quote ===== */
.quote{ border:1px solid var(--border); border-radius:12px; padding:12px; background:#fff; }
.qrow{
  display:grid; grid-template-columns:1fr 110px 110px 80px; align-items:center;
  gap:10px; padding:10px 8px; border-bottom:1px solid var(--border);
}
.qrow:last-child{ border-bottom:0; }
.qmain{ display:flex; flex-direction:column; gap:4px; }
.qname a{ color:#0f172a; text-decoration:none; }
.qmeta{ color:#64748b; font-size:12px; }
.qqty input{
  width:100%; padding:8px; border-radius:8px; border:1px solid var(--border);
  background:#fff; color:#0f172a;
}
.qprice{ font-weight:700; color:#0b3fd6; }

.qform .row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.qform label{ display:flex; flex-direction:column; gap:6px; font-size:14px; color:#334155; }
.qform input, .qform textarea{
  padding:10px 12px; border-radius:8px; border:1px solid var(--border);
  background:#fff; color:#0f172a;
}
@media (max-width:700px){ .qform .row{ grid-template-columns:1fr; } }

/* ===== Footer (light) ===== */
.site-footer{
  margin-top:48px;
  background:#f3f6fb;
  border-top:1px solid var(--border);
}
.site-footer .wrap{
  display:grid; gap:24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding:28px 16px;
}
.footer-brand{ display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.footer-brand img{ width:36px; height:36px; object-fit:contain; }
.site-footer .title{ font-weight:700; margin-bottom:6px; color:#0f172a; }
.site-footer .sub{ font-size:12px; color:#475569; }
.links{ list-style:none; padding:0; margin:0; }
.links li{ margin:6px 0; }
.links a{ color:#0f172a; text-decoration:none; }
.links a:hover{ color:#0b3fd6; text-decoration:underline; }
.footnote{
  text-align:center; padding:12px;
  border-top:1px solid var(--border); font-size:12px; color:#475569;
}

/* ===== QR section (if used) ===== */
.qr-card{
  display:grid; grid-template-columns:160px 1fr; gap:16px; align-items:center;
  border:1px solid var(--border); background:#fff; border-radius:14px; padding:16px;
  box-shadow:0 1px 0 #e5e7eb, 0 1px 2px rgba(0,0,0,.03);
}
.qr-card img{
  width:160px; height:160px; background:#fff; border-radius:12px; padding:8px; border:1px solid #e5e7eb;
}
@media (max-width:560px){
  .qr-card{ grid-template-columns:1fr; justify-items:center; text-align:center; }
}
/* --- Product gallery --- */
.gallery{ display:grid; gap:10px; }
.gallery .main{
  width:100%; aspect-ratio:4/3; object-fit:cover;
  border-radius:12px; background:#f1f5f9; border:1px solid var(--border);
}
.thumbs{ display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; }
.thumbs img{
  width:70px; height:70px; object-fit:cover;
  border-radius:8px; border:1px solid var(--border);
  cursor:pointer; opacity:.85;
}
.thumbs img.active{ outline:2px solid var(--brand); opacity:1; }
/* Hide any legacy price labels */
.price, .product-price, .card-price, .amount, .amount-lkr, .money, .lkr, [data-price], [data-amount] {
  display: none !important;
}
/* Poster banner */
.poster{
  width:100%;
  height:340px;          /* change if you want taller/shorter */
  object-fit:cover;      /* crops nicely */
  border-radius:16px;
  border:1px solid #e2e8f0;
  display:block;
}
/* ---------- Mobile tweaks (phones & small tablets) ---------- */
@media (max-width: 768px) {
  /* spacing */
  .wrap { padding: 12px; }

  /* page titles a bit smaller */
  .page-title { font-size: 22px; line-height: 1.2; }

  /* poster banners */
  .poster {
    height: 200px;          /* was 340px on desktop */
    border-radius: 12px;
  }

  /* product toolbar & search bars stack vertically */
  .toolbar,
  .searchbar {
    flex-direction: column;
    gap: 8px;
  }
  .toolbar .btn,
  .toolbar input,
  .toolbar select,
  .searchbar .input,
  .searchbar .btn {
    width: 100%;
  }

  /* product grid → 1 column on phones */
  .grid { grid-template-columns: 1fr; }

  /* quote form inputs take full width */
  input.input, textarea.input, select.input { width: 100%; }

  /* footer stacks to one column + smaller map */
  .site-footer .wrap { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .site-footer img[alt*="Map"] { height: 160px !important; }
}

/* even smaller phones */
@media (max-width: 420px) {
  .poster { height: 170px; }
}
.add-to-quote-btn { width: calc(100% - 24px); }
/* product meta under titles */
.card .meta {
  font-size: 12px;
  color: #475569;   /* muted */
  margin-top: 6px;
}
