/*
Theme Name: Al-Amal Plastics Theme (Classic)
Theme URI: https://plasticcrates.ae
Author: Al-Amal Plastics
Author URI: https://plasticcrates.ae
Description: A premium, classic PHP-based WordPress theme built for industrial plastic crate manufacturing.
Version: 7.0.0
Text Domain: plastic-crates
*/

/* ============================================================
   STAK PALLET CRATES — B2B industrial catalog site
   Design tokens — refined professional pass
   ============================================================ */
:root {
  --ink: #171B23;
  --paper: #F7F6F2;
  --paper-2: #EDEBE3;
  --panel: #FFFFFF;
  --amber: #B9852E;
  --amber-dark: #96691F;
  --steel: #2E4A61;
  --steel-dark: #1B2C3B;
  --grey: #656B72;
  --grey-2: #8A8F96;
  --line: #E3E1D8;
  --line-dark: #D2CFC4;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 6px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(23, 27, 35, 0.06), 0 1px 1px rgba(23, 27, 35, 0.04);
  --shadow-md: 0 6px 20px rgba(23, 27, 35, 0.08), 0 2px 6px rgba(23, 27, 35, 0.05);
  --shadow-lg: 0 16px 40px rgba(23, 27, 35, 0.12), 0 4px 12px rgba(23, 27, 35, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
}

p {
  margin: 0 0 1em;
  color: var(--ink);
}

.mono {
  font-family: var(--font-mono);
}

/* focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- layout shell ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- top bar ---------- */
.topbar {
  background: var(--steel-dark);
  color: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 9px;
  padding-bottom: 9px;
  flex-wrap: wrap;
  gap: 6px;
}

.topbar a {
  color: var(--paper);
  opacity: 0.92;
}

.topbar a:hover {
  opacity: 1;
  text-decoration: underline;
}

.topbar .sep {
  opacity: 0.35;
  margin: 0 12px;
}

/* ---------- header / nav ---------- */
header.site {
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: 0.01em;
}

.logo .mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  background: var(--ink);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}

.logo .tag {
  font-family: var(--font-mono);
  text-transform: none;
  font-size: 11px;
  color: var(--grey-2);
  letter-spacing: 0.01em;
}

nav.primary ul {
  display: flex;
  gap: 30px;
}

nav.primary a {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  opacity: 0.82;
}

nav.primary a:hover {
  opacity: 1;
}

nav.primary a.active,
nav.primary .current-menu-item a {
  border-bottom-color: var(--steel);
  opacity: 1;
  font-weight: 600;
}

.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width:900px) {
  nav.primary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: var(--shadow-md);
  }

  nav.primary.is-active,
  nav.primary.open {
    display: block;
  }

  nav.primary ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 28px 20px;
  }

  nav.primary a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .burger {
    display: block;
  }

  .nav-cta .btn-text-label {
    display: none;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--steel-dark);
}

.btn-amber {
  background: var(--amber);
  color: #fff;
}

.btn-amber:hover {
  background: var(--amber-dark);
}

.btn-outline {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line-dark);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-whatsapp {
  background: #25D366;
  color: #0B1A10;
}

.btn-whatsapp:hover {
  background: #1DA851;
}

.btn-email {
  background: var(--steel);
  color: var(--paper);
}

.btn-email:hover {
  background: var(--steel-dark);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.enquiry-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line-dark);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-top: 68px;
  padding-bottom: 64px;
}

.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--steel);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.hero .eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.08;
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.hero h1 em {
  font-style: normal;
  color: var(--steel);
}

.hero p.lead {
  font-size: 17px;
  color: var(--grey);
  max-width: 46ch;
  margin-bottom: 30px;
}

/* blueprint crate illustration */
.crate-art {
  position: relative;
}

.crate-art svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(23, 27, 35, 0.10));
}

.dim-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--steel);
}

.dim-line {
  stroke: var(--steel);
  stroke-width: 1;
}

/* stat strip */
.stat-strip {
  background: var(--steel-dark);
  color: var(--paper);
}

.stat-strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat {
  padding: 28px 22px;
  border-left: 1px solid rgba(247, 246, 242, 0.12);
}

.stat:first-child {
  border-left: none;
}

.stat .num {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--paper);
  font-weight: 600;
}

.stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--paper-2);
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.8;
}

@media (max-width:900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .stat-strip .wrap {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    border-left: none;
    border-top: 1px solid rgba(247, 246, 242, 0.12);
  }

  .stat:nth-child(odd) {
    border-right: 1px solid rgba(247, 246, 242, 0.12);
  }
}

/* ---------- section basics ---------- */
section {
  padding: 76px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 20px;
}

.section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--steel);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.section-head h2 {
  font-size: clamp(24px, 2.8vw, 33px);
  margin: 8px 0 0;
  font-weight: 600;
}

.section-head .note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey-2);
  max-width: 32ch;
  text-align: right;
}

@media (max-width:700px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head .note {
    text-align: left;
  }
}

/* ---------- category grid ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cat-card {
  background: var(--panel);
  padding: 30px 26px;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--line-dark);
}

.cat-card .idx {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--amber-dark);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.cat-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
  font-weight: 600;
}

.cat-card p {
  color: var(--grey);
  font-size: 14px;
  flex: 1;
}

.cat-card .specs {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.cat-card .go {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.cat-card .go::after {
  content: ' →';
  color: var(--amber-dark);
}

@media (max-width:900px) {
  .cat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:600px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card .thumb {
  aspect-ratio: 4/3;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .body {
  padding: 20px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .cat-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--steel);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 500;
}

.product-card h3 {
  font-size: 17.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.product-card .specs-mini {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  margin-bottom: 16px;
}

.product-card .specs-mini span {
  display: block;
  margin-bottom: 2px;
}

.product-card .card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

@media (max-width:900px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.filter-chip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 9px 18px;
  border: 1px solid var(--line-dark);
  background: var(--panel);
  cursor: pointer;
  border-radius: 999px;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---------- blueprint spec panel ---------- */
.spec-panel {
  border: 1px solid var(--line-dark);
  background: var(--panel);
  position: relative;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--steel);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}

.spec-table tr {
  border-bottom: 1px solid var(--line);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 12px 4px;
}

.spec-table td:first-child {
  color: var(--grey-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 11px;
  width: 46%;
}

.spec-table td:last-child {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

/* ---------- two column content ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width:860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* ---------- process / steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step {
  background: var(--panel);
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step .n {
  font-family: var(--font-mono);
  color: var(--amber-dark);
  font-size: 13px;
  margin-bottom: 12px;
}

.step h4 {
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 600;
}

.step p {
  font-size: 13.5px;
  color: var(--grey);
  margin: 0;
}

@media (max-width:900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:560px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- band / CTA ---------- */
.band {
  background: var(--steel-dark);
  color: var(--paper);
}

.band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 48px 28px;
  flex-wrap: wrap;
}

.band h2 {
  color: var(--paper);
  font-size: clamp(21px, 2.8vw, 28px);
  margin: 0;
  font-weight: 600;
}

.band p {
  color: var(--paper-2);
  margin: 6px 0 0;
  opacity: 0.85;
}

/* ---------- about page ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  border-top: 2px solid var(--amber);
  padding-top: 16px;
}

.value-card h3 {
  font-size: 16.5px;
  font-weight: 600;
}

.value-card p {
  color: var(--grey);
  font-size: 14.5px;
}

@media (max-width:760px) {
  .value-grid {
    grid-template-columns: 1fr;
  }
}

.timeline {
  border-left: 2px solid var(--line-dark);
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.timeline .item {
  position: relative;
}

.timeline .item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--paper);
  border: 2px solid var(--steel);
  border-radius: 50%;
}

.timeline .yr {
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

@media (max-width:860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.channel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.channel .ico {
  width: 40px;
  height: 40px;
  flex: none;
  background: var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: #fff;
}

.channel .ico svg {
  width: 19px;
  height: 19px;
}

.channel h4 {
  font-size: 14.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.channel p {
  font-size: 14px;
  margin: 0;
  color: var(--grey);
}

.channel a.link {
  color: var(--steel);
  font-weight: 600;
}

form.enquiry {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

form.enquiry label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--grey-2);
  display: block;
  margin-bottom: 6px;
}

form.enquiry input,
form.enquiry select,
form.enquiry textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-dark);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  border-radius: var(--radius-sm);
}

form.enquiry input:focus,
form.enquiry select:focus,
form.enquiry textarea:focus {
  border-color: var(--steel);
}

form.enquiry textarea {
  resize: vertical;
  min-height: 110px;
}

.form-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width:560px) {
  .form-row2 {
    grid-template-columns: 1fr;
  }
}

/* map placeholder */
.map-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey-2);
  line-height: 1.7;
}

/* ---------- footer ---------- */
footer.site {
  background: var(--ink);
  color: var(--paper-2);
  padding-top: 56px;
}

footer.site .wrap {
  padding-bottom: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(247, 246, 242, 0.12);
}

.footer-grid h4 {
  color: var(--paper);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-weight: 600;
}

.footer-grid ul li {
  margin-bottom: 10px;
}

.footer-grid a {
  font-size: 14px;
  color: var(--paper-2);
  opacity: 0.85;
}

.footer-grid a:hover {
  opacity: 1;
  color: var(--paper);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--grey-2);
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width:860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- floating buttons ---------- */
.float-call {
  position: fixed;
  bottom: 86px;
  right: 22px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(23, 27, 35, 0.15), 0 5px 15px rgba(23, 27, 35, 0.08);
}

.float-wa {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(23, 27, 35, 0.15), 0 5px 15px rgba(23, 27, 35, 0.08);
}

.float-wa svg,
.float-call svg {
  width: 26px;
  height: 26px;
}

/* ---------- breadcrumb ---------- */
.crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey-2);
  padding: 20px 0 0;
}

.crumb a {
  color: var(--steel);
}

.crumb .sep {
  margin: 0 6px;
  color: var(--line-dark);
}

/* page header (inner pages) */
.page-head {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-dark);
  padding: 40px 0 44px;
}

.page-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--steel);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}

.page-head h1 {
  font-size: clamp(26px, 3.6vw, 40px);
  margin: 0;
  font-weight: 600;
}

.page-head p {
  color: var(--grey);
  max-width: 60ch;
  margin-top: 14px;
}

/* ---------- gallery and thumbnails ---------- */
.crate-gallery-side {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.crate-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  max-height: 440px;
  overflow-y: auto;
}

.crate-thumb {
  width: 72px;
  height: 72px;
  border: 1.5px solid var(--line);
  padding: 6px;
  border-radius: var(--radius-sm, 8px);
  background: #fff;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.crate-thumb:hover {
  border-color: var(--steel, #333);
}

.crate-thumb.active {
  border: 2px solid var(--steel, #000);
}

.crate-thumb .thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.crate-main-image {
  background: var(--paper-2, #f8f9fa);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--line);
  flex: 1;
  width: 100%;
  height: 440px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.crate-main-image .main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.zoom-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel, #333);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.crate-main-image:hover .zoom-badge {
  transform: scale(1.1);
  background: #fff;
}

/* ---------- Lightbox Modal ---------- */
.crate-lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  animation: fadeInLightbox 0.2s ease-out forwards;
}

@keyframes fadeInLightbox {
  from { opacity: 0; }
  to { opacity: 1; }
}

.crate-lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.crate-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  transition: color 0.2s ease;
}

.crate-lightbox-close:hover {
  color: var(--amber, #f59e0b);
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }
  .topbar .wrap {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    font-size: 12px;
  }
  .crate-gallery-side {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 12px;
    overflow: hidden;
  }
  .crate-main-image {
    order: 1;
    width: 100%;
    height: auto;
    min-height: 240px;
    max-height: 320px;
    aspect-ratio: 1 / 1;
    padding: 1rem;
  }
  .crate-main-image .main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .crate-thumbnails {
    order: 2;
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: none !important;
    padding: 6px 2px 10px 2px !important;
    gap: 10px !important;
    scrollbar-width: thin !important;
  }
  .crate-thumb {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
  }
}

/* ---------- pagination and utilities ---------- */
.crate-pagination {
  text-align: center;
  margin-top: 4rem;
}

.crate-pagination .nav-links {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.crate-pagination a,
.crate-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line-dark);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.crate-pagination a:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.crate-pagination .current {
  background: var(--steel);
  color: #fff;
  border-color: var(--steel);
}

.crate-pagination .dots {
  border: none;
  background: transparent;
}

.thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.no-products-msg {
  text-align: center;
  color: var(--grey);
  padding: 4rem 0;
}