/* =========================================================
   SECTION 01 : ROOT / THEME
========================================================= */
:root{
  --bg:#fffaf4;
  --surface:#fffdf8;
  --surface-soft:#fff7ea;
  --surface-soft-2:#fff3df;
  --text:#2f2417;
  --heading:#8a5a1c;
  --muted:#7b6955;
  --line:#eadcc7;
  --line-strong:#dcc8aa;
  --primary:#c07f22;
  --primary-dark:#945f1a;
  --accent:#e3a548;
  --shadow-xs:0 8px 18px rgba(92,65,29,.05);
  --shadow-sm:0 14px 34px rgba(92,65,29,.08);
  --shadow-md:0 22px 48px rgba(92,65,29,.12);
  --radius-sm:14px;
  --radius-md:20px;
  --radius-lg:28px;
  --radius-xl:36px;
  --container:1200px;
}

/* =========================================================
   SECTION 02 : RESET / GLOBAL
========================================================= */
*,
*::before,
*::after{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  min-width:320px;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(192,127,34,.08), transparent 24%),
    radial-gradient(circle at top right, rgba(239,179,92,.10), transparent 22%),
    linear-gradient(180deg, #fffdf9 0%, #fdf6ec 44%, #fffaf4 100%);
  color:var(--text);
  line-height:1.5;
  overflow-x:hidden;
}

img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}

button,
input,
select,
.card,
.card-head,
.card-body,
.spec-grid,
.spec-row,
.price-grid,
.actions,
.cathead,
.catlist,
.catlink,
.field,
.summary,
.hero-card,
.controls,
.catnav,
.catalog,
.catsec{
  min-width:0;
}

.wrap{
  width:min(var(--container), calc(100% - 32px));
  margin-inline:auto;
}

.layout{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  padding:22px 0 40px;
}

/* =========================================================
   SECTION 03 : HERO / HEADER
========================================================= */
.page-header{
  position:relative;
  padding:30px 0 42px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.78), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(200,155,93,.22), transparent 20%),
    linear-gradient(135deg,#fbf4ed 0%, #f1e0d0 48%, #e2c2aa 100%);
  border-bottom:1px solid var(--line);
}
.page-header::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:.35;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(110,31,27,.04) 1px, transparent 1px),
    linear-gradient(rgba(110,31,27,.03) 1px, transparent 1px);
  background-size:42px 42px;
}
.hero-wrap{
  position:relative;
  z-index:1;
}
.hero-header{
  padding:clamp(28px,4vw,48px);
  border-radius:var(--radius-xl);
  border:1px solid rgba(110,31,27,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,248,240,.82));
  backdrop-filter:blur(8px);
  box-shadow:0 24px 56px rgba(80,28,20,.12);
}
.hero-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  align-items:start;
}
.hero-copy{
  color:var(--text);
  min-width:0;
}
.hero-tag{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:9px 16px;
  border-radius:999px;
  background:linear-gradient(180deg,#fff5e6,#fff0dc);
  border:1px solid #f2dec2;
  color:var(--primary-dark);
  font-size:.92rem;
  font-weight:700;
}
.hero-tag::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:linear-gradient(180deg,var(--accent),#b47b2e);
  box-shadow:0 0 0 4px rgba(227,165,72,.16);
}
.brandline{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.brandtop{
  display:flex;
  align-items:center;
  gap:12px;
}
.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg,#fff,#fff7ed);
  border:1px solid rgba(148,163,184,.35);
  box-shadow:0 8px 22px rgba(2,6,23,.06);
  position:relative;
  flex:0 0 44px;
}
.logo::before{
  content:"";
  position:absolute;
  width:20px;
  height:20px;
  left:11px;
  top:11px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--primary),var(--primary-dark));
}
.logo::after{
  content:"";
  position:absolute;
  width:10px;
  height:10px;
  right:8px;
  top:8px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 0 0 1px rgba(148,163,184,.45);
}
.brandtext .t1{
  font-size:15px;
  font-weight:900;
  color:var(--heading);
}
.brandline .t2{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(110,31,27,.10);
  color:var(--primary-dark);
  font-size:.92rem;
  font-weight:600;
  box-shadow:var(--shadow-xs);
}
.hero-copy h1{
  margin:18px 0 12px;
  font-size:clamp(2.6rem,5vw,4.2rem);
  line-height:.95;
  letter-spacing:-.03em;
  color:var(--heading);
  max-width:none;
  width:100%;
}
.hero-desc,
.hero-copy p{
  margin:0;
  color:var(--muted);
  max-width:none;
  width:100%;
}
.hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:20px 0 0;
}
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(110,31,27,.10);
  color:var(--primary-dark);
  font-size:.92rem;
  font-weight:600;
  box-shadow:var(--shadow-xs);
}
.hero-side{
  display:none;
}
.hero-visual{
  width:min(440px,100%);
  min-height:320px;
  padding:30px;
  border-radius:32px;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(250,237,224,.82));
  border:1px solid rgba(110,31,27,.10);
  box-shadow:0 22px 48px rgba(80,28,20,.10);
  position:relative;
  overflow:hidden;
}
.hero-visual::before{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(227,165,72,.30) 0%, rgba(227,165,72,.06) 70%, transparent 72%);
  top:-30px;
  right:-20px;
}
.hero-visual::after{
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(148,95,26,.18) 0%, rgba(148,95,26,.05) 70%, transparent 72%);
  bottom:-30px;
  left:-10px;
}
.hero-dashboard{
  position:relative;
  z-index:1;
  display:grid;
  gap:14px;
  height:100%;
  align-content:center;
}
.hero-panel{
  padding:16px 18px;
  border-radius:20px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(110,31,27,.10);
  box-shadow:var(--shadow-xs);
}
.hero-panel .k{
  font-size:12px;
  font-weight:900;
  color:var(--heading);
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:6px;
}
.hero-panel .v{
  font-size:18px;
  font-weight:800;
  color:var(--text);
  line-height:1.2;
}
.hero-mini-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.hero-mini{
  padding:14px;
  border-radius:18px;
  background:rgba(255,250,240,.92);
  border:1px solid rgba(110,31,27,.10);
  box-shadow:var(--shadow-xs);
}
.hero-mini .k{
  font-size:11px;
  font-weight:900;
  color:var(--heading);
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:6px;
}
.hero-mini .v{
  font-size:15px;
  font-weight:800;
  color:#5c4738;
  line-height:1.2;
}
@media (max-width:1050px){
  .single-product-card .card-body{
    grid-template-columns:minmax(230px,.9fr) minmax(0,1.35fr);
  }
  .single-product-card .price-grid{
    grid-column:1 / -1;
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:900px){
  .hero-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width:700px){
  .single-product-card .card-body{
    grid-template-columns:1fr;
  }
  .single-product-card .price-grid{
    grid-column:auto;
    grid-template-columns:1fr 1fr;
  }
  .single-product-card .thumb{
    min-height:220px;
  }
  .single-product-card .thumb img{
    max-height:185px;
  }
  .single-product-card .actions{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:640px){
  .wrap{
    width:min(var(--container), calc(100% - 16px));
  }

  .hero-header{
    padding:22px;
  }
  .hero-visual{
    min-height:260px;
    padding:20px;
  }
}

/* =========================================================
   SECTION 04 : FILTERS / CONTROLS
========================================================= */
.controls{
  background:linear-gradient(180deg,#fffdf8 0%,#fff7ea 100%);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  padding:16px;
}

.controls-row{
  display:grid;
  grid-template-columns:minmax(0,2fr) repeat(3, minmax(0,1fr));
  gap:14px;
}

.field{min-width:0}

.label{
  margin-bottom:6px;
  font-size:13px;
  font-weight:800;
  color:var(--heading);
}

.field input,
.field select{
  width:100%;
  min-height:46px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fffdf8;
  color:var(--text);
  outline:none;
}

.field input:focus,
.field select:focus{
  border-color:rgba(192,127,34,.45);
  box-shadow:0 0 0 4px rgba(192,127,34,.10);
}

.summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
  color:#5c4738;
}

.clear{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#fffaf0 0%,#fff2d9 100%);
  color:var(--primary-dark);
  font-weight:700;
  cursor:pointer;
  transition:.15s ease;
}

.clear:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(92,65,29,.08);
}

/* =========================================================
   SECTION 05 : CATEGORIES TWO LINES
========================================================= */
.catnav{
  background:linear-gradient(180deg,#fffdf8 0%,#fff7ea 100%);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  padding:16px;
}

.catnav h3{
  margin:0 0 12px;
  font-size:18px;
  letter-spacing:-.02em;
  color:var(--heading);
}

.catlist{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:10px;
}

.catlink{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:48px;
  padding:11px 14px;
  border-radius:18px;
  border:1px solid var(--line);
  background:#fffaf0;
  font-size:14px;
  font-weight:700;
  color:var(--primary-dark);
  transition:.15s ease;
}

.catlink:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 18px rgba(92,65,29,.06);
}

.catlink.active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(180deg,var(--primary),var(--primary-dark));
}

.count{
  display:inline-flex;
  min-width:28px;
  height:28px;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(47,36,23,.08);
  font-size:12px;
  font-weight:900;
  flex:0 0 auto;
}

.catlink.active .count{
  background:rgba(255,255,255,.18);
}

/* =========================================================
   SECTION 06 : CATALOG / PRODUCT CARDS
========================================================= */
.catalog{min-width:0}

.catsec{
  background:linear-gradient(180deg,#fffdf8 0%,#fff7ea 100%);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  padding:12px;
  overflow:hidden;
}

.cathead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
  flex-wrap:wrap;
}

.cathead h2{
  margin:0 0 6px;
  font-size:28px;
  letter-spacing:-.02em;
  color:var(--heading);
}

.cathead p{
  margin:0;
  color:var(--muted);
  max-width:70ch;
}

.catmeta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  background:#fffaf0;
  border:1px solid var(--line);
  color:#5c4738;
  font-size:13px;
  font-weight:800;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(320px, 360px));
  justify-content:center;
  gap:16px;
}

/* Single-product categories use the available width more effectively. */
.grid.single-product-grid{
  grid-template-columns:minmax(0, 960px);
}

.single-product-card .card-body{
  grid-template-columns:minmax(230px,.82fr) minmax(220px,1fr) minmax(250px,1fr);
  align-items:stretch;
}

.single-product-card .thumb{
  min-height:286px;
  height:100%;
}

.single-product-card .thumb img{
  max-height:245px;
}

.single-product-card .spec-grid,
.single-product-card .price-grid{
  align-content:stretch;
}

.single-product-card .spec-row,
.single-product-card .price-card{
  height:100%;
  align-content:center;
}

.single-product-card .price-grid{
  grid-template-columns:1fr;
}

.single-product-card .actions{
  grid-template-columns:repeat(2, minmax(180px, 260px));
  justify-content:center;
}

.card{
  background:#fffdf8;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.card-head{
  padding:16px 16px 0;
}

.ptitle{
  margin:0;
  font-size:20px;
  line-height:1.2;
  letter-spacing:-.02em;
  color:var(--heading);
  word-break:break-word;
}

.card-body{
  padding:14px 16px 16px;
  display:grid;
  gap:14px;
}

.thumb{
  min-height:190px;
  border-radius:18px;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid var(--line);
}

.thumb img{
  max-height:150px;
  width:auto;
  object-fit:contain;
  padding:14px;
}

.spec-grid{
  display:grid;
  gap:10px;
}

.spec-row{
  display:grid;
  gap:4px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fffaf0;
}

.spec-label{
  font-size:12px;
  font-weight:900;
  color:var(--heading);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.spec-value{
  font-size:14px;
  font-weight:700;
  color:#5c4738;
  word-break:break-word;
}

.price-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.price-card{
  display:grid;
  gap:4px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#fffaf0 0%,#fff2d9 100%);
}

.price-card .price-label{
  font-size:12px;
  font-weight:900;
  color:var(--heading);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.price-card .price-value{
  font-size:18px;
  font-weight:900;
  line-height:1.15;
  color:var(--heading);
}

.price-card .price-sub{
  font-size:12px;
  color:var(--muted);
  word-break:break-word;
}

.actions{
  margin-top:auto;
  padding:14px 16px 16px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  border-top:1px solid var(--line);
}

.actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 12px;
  border-radius:14px;
  font-weight:800;
  transition:.15s ease;
  text-align:center;
}

.actions a:hover{
  transform:translateY(-1px);
}

.actions a:first-child{
  background:linear-gradient(180deg,#fffaf0 0%,#fff2d9 100%);
  border:1px solid var(--line);
  color:var(--primary-dark);
}

.buy{
  color:#fff !important;
  background:linear-gradient(180deg,var(--primary),var(--primary-dark));
}

.download{
  color:#fff !important;
  background:linear-gradient(90deg,#0f766e,#0ea5a4);
}

/* =========================================================
   SECTION 07 : RESPONSIVE
========================================================= */

@media (max-width:900px){
  .controls-row{grid-template-columns:1fr 1fr}
  .catlist{grid-template-columns:repeat(3, minmax(0,1fr))}
}

@media (max-width:720px){
  .catlist{grid-template-columns:repeat(2, minmax(0,1fr))}
}

@media (max-width:640px){
  .wrap{padding-inline:12px}
  .grid{
    grid-template-columns:1fr;
    justify-content:stretch;
  }
  .hero-card{padding:20px}
  .controls,
  .catnav{padding:14px}

  .catsec{padding:12px}
  .controls-row{grid-template-columns:1fr}
  .summary{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width:480px){
  .catlist{grid-template-columns:1fr}
  .price-grid{grid-template-columns:1fr}
  .actions{grid-template-columns:1fr}
  .hero h1{
    font-size:30px;
    max-width:none;
  }
}
