/* PACKWILL Industrial — global styles */
:root {
  --primary: #c67c2c;
  --primary-dark: #a3641e;
  --dark: #22252a;
  --ink: #2d3238;
  --gray: #6b7280;
  --light: #f7f5f1;
  --white: #ffffff;
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink); line-height: 1.65; background: var(--white); }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* Header */
header { background: var(--white); box-shadow: 0 1px 8px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 100; }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--dark); letter-spacing: 1px; }
.logo img { height: 38px; }
.logo span { color: var(--primary); }
nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
nav a { color: var(--ink); font-weight: 600; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: var(--primary); border-color: var(--primary); }
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 12px 28px; border-radius: var(--radius); font-weight: 700; border: none; cursor: pointer; transition: .2s; font-size: 1rem; }
.btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid #fff; }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-sm { padding: 9px 20px; font-size: .9rem; }

/* Hero */
.hero { background: linear-gradient(rgba(20,20,24,.62), rgba(20,20,24,.62)), url("../images/hero-bg.jpg") center/cover no-repeat; color: #fff; padding: 130px 0 150px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; margin-bottom: 18px; }
.hero p { font-size: 1.15rem; max-width: 720px; margin: 0 auto 34px; opacity: .92; }
.hero .btn + .btn { margin-left: 14px; }

/* Sections */
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2rem; color: var(--dark); }
.section-title .bar { width: 60px; height: 4px; background: var(--primary); margin: 14px auto; border-radius: 2px; }
.section-title p { color: var(--gray); max-width: 640px; margin: 0 auto; }
.bg-light { background: var(--light); }

/* Grid / cards */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.07); transition: .25s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 26px rgba(0,0,0,.13); }
.card img { height: 230px; width: 100%; object-fit: cover; }
.card-body { padding: 22px; }
.card-body h3 { color: var(--dark); margin-bottom: 8px; font-size: 1.15rem; }
.card-body p { color: var(--gray); font-size: .93rem; margin-bottom: 14px; }
.tag { display: inline-block; background: #f4e8d8; color: var(--primary-dark); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; margin: 3px 4px 3px 0; }

/* Feature strip */
.stats { background: var(--dark); color: #fff; padding: 56px 0; }
.stats .grid-4 { text-align: center; }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .95rem; opacity: .85; }

/* Contact / form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; color: var(--dark); }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #d6d3cd; border-radius: 8px; font-size: .95rem; font-family: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(198,124,44,.15); }
.form-status { margin-top: 14px; padding: 12px 16px; border-radius: 8px; display: none; font-weight: 600; }
.form-status.ok { display: block; background: #e7f6ec; color: #1e7a43; }
.form-status.err { display: block; background: #fdeaea; color: #b23434; }

/* Contact info blocks */
.contact-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.contact-item .icon { width: 46px; height: 46px; flex: 0 0 46px; background: #f4e8d8; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.contact-item h4 { color: var(--dark); }
.contact-item p { color: var(--gray); font-size: .95rem; }

/* Page banner */
.page-banner { background: linear-gradient(rgba(20,20,24,.6), rgba(20,20,24,.6)), url("../images/warehouse-aisle.jpg") center/cover no-repeat; color: #fff; text-align: center; padding: 90px 0; }
.page-banner h1 { font-size: 2.4rem; }
.page-banner p { opacity: .9; margin-top: 8px; }

/* Table */
table.spec { width: 100%; border-collapse: collapse; margin-top: 20px; background: #fff; }
table.spec th, table.spec td { border: 1px solid #e5e1da; padding: 12px 14px; text-align: left; font-size: .93rem; }
table.spec th { background: var(--light); color: var(--dark); }

/* Payment methods */
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.pay-card { background: #fff; border: 1px solid #e8e4dd; border-radius: var(--radius); padding: 26px; text-align: center; }
.pay-card .badge { display: inline-block; background: #eef4ee; color: #1e7a43; font-size: .75rem; font-weight: 700; border-radius: 14px; padding: 3px 12px; margin-top: 10px; }
.pay-card .badge.off { background: #f4e8d8; color: var(--primary-dark); }

/* Footer */
footer { background: var(--dark); color: #cfd2d6; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; padding-bottom: 40px; }
footer h4 { color: #fff; margin-bottom: 16px; font-size: 1.05rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 9px; font-size: .92rem; }
footer a { color: #cfd2d6; }
footer a:hover { color: var(--primary); }
.copyright { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: .85rem; opacity: .7; }

/* Floating WhatsApp */
.float-wa { position: fixed; right: 22px; bottom: 22px; background: #25d366; color: #fff; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.25); z-index: 200; transition: .2s; }
.float-wa:hover { transform: scale(1.1); }
.float-wa svg { width: 30px; height: 30px; fill: #fff; }

/* Gallery masonry-ish */
.gallery-grid { columns: 3 300px; column-gap: 20px; }
.gallery-grid figure { break-inside: avoid; margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.gallery-grid img { width: 100%; transition: .3s; }
.gallery-grid img:hover { transform: scale(1.04); }
.gallery-grid figcaption { padding: 12px 16px; font-size: .9rem; color: var(--gray); background: #fff; }

/* Timeline */
.timeline { position: relative; max-width: 760px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 3px; background: #eadfce; }
.tl-item { position: relative; padding-left: 60px; margin-bottom: 34px; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 4px solid #f4e8d8; }
.tl-item h4 { color: var(--dark); }
.tl-item p { color: var(--gray); font-size: .94rem; }

/* Responsive */
@media (max-width: 820px) {
  .nav-wrap { flex-direction: column; gap: 12px; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 90px 0 110px; }
  .hero .btn + .btn { margin-left: 0; margin-top: 12px; }
}

/* ===== Language switcher (7 languages, dropdown) ===== */
.lang-switch { position: relative; margin-left: 18px; font-size: .9rem; font-weight: 700; }
.lang-switch::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 700;
  background: transparent; border: 1px solid #e3e0d9; color: var(--ink);
  padding: 6px 12px; border-radius: 20px; cursor: pointer; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn .globe { font-size: .95rem; }
.lang-btn .caret { font-size: .7rem; transition: transform .2s; }
.lang-switch.open .lang-btn .caret { transform: rotate(180deg); }
.lang-menu {
  display: block; position: absolute; top: calc(100% + 12px); right: 0; min-width: 176px;
  background: #fff; border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.16);
  padding: 8px 0; gap: 0; list-style: none; text-align: left; z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.lang-switch:hover .lang-menu,
.lang-switch:focus-within .lang-menu,
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li { margin: 0; }
.lang-menu a {
  display: block; padding: 8px 18px; color: var(--ink); font-size: .9rem; font-weight: 600;
  white-space: nowrap; border-bottom: none;
}
.lang-menu a:hover { background: #f7f5f1; color: var(--primary); border-color: transparent; }
.lang-menu a.on { color: var(--primary); }
@media (max-width: 860px) {
  .lang-switch { margin-left: 0; width: 100%; }
  .lang-btn { width: 100%; justify-content: center; }
  .lang-menu {
    position: static; min-width: 0; box-shadow: none; background: #f7f5f1;
    border-radius: 8px; margin-top: 6px; display: none;
  }
  .lang-switch.open .lang-menu { display: block; opacity: 1; visibility: visible; transform: none; }
}

/* ===== Performance optimizations ===== */
/* Hero: enhance to WebP when supported; older browsers keep the JPEG
   declaration earlier in this file. */
@supports (background-image: image-set(url("../images/webp/hero-bg.webp") type("image/webp"))) {
  .hero {
    background-image: linear-gradient(rgba(20,20,24,.62), rgba(20,20,24,.62)),
      image-set(url("../images/webp/hero-bg.webp") type("image/webp"),
                url("../images/hero-bg.jpg") type("image/jpeg"));
  }
  .page-banner {
    background-image: linear-gradient(rgba(20,20,24,.6), rgba(20,20,24,.6)),
      image-set(url("../images/webp/warehouse-aisle.webp") type("image/webp"),
                url("../images/warehouse-aisle.jpg") type("image/jpeg"));
  }
}
/* picture wrapper should not add inline gaps */
picture { display: block; }
/* Smooth scroll + better tap targets */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* Optimize font rendering */
body { text-rendering: optimizeSpeed; }

/* ===== Form validation UX ===== */
input.is-invalid, textarea.is-invalid { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.field-error { display: block; color: #b23434; font-size: .8rem; font-weight: 600; margin-top: 5px; }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ===== Products hover dropdown (desktop) ===== */
nav ul { position: relative; }
nav li.has-dropdown { position: relative; }
nav .dropdown {
  display: block;
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  background: #fff; min-width: 250px; padding: 10px 0;
  border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.16);
  list-style: none; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 150; text-align: left;
}
nav .dropdown::before {
  content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px;
}
nav li.has-dropdown:hover .dropdown,
nav li.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(4px);
}
nav .dropdown li { margin: 0; }
nav .dropdown a {
  display: block; padding: 9px 22px; font-size: .9rem; font-weight: 600;
  color: var(--ink); border-bottom: none; white-space: nowrap;
}
nav .dropdown a:hover { background: #f7f5f1; color: var(--primary); }
nav .drop-toggle .caret { display: inline-block; font-size: .7rem; margin-left: 5px; transition: transform .2s; }
nav li.has-dropdown:hover .caret { transform: rotate(180deg); }

/* ===== Mobile hamburger menu ===== */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; padding: 8px; border-radius: 8px;
}
.nav-toggle span {
  display: block; width: 100%; height: 3px; margin: 5px 0;
  background: var(--dark); border-radius: 2px; transition: .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-wrap { flex-wrap: wrap; }
  .nav-wrap nav { width: 100%; }
  .nav-wrap nav ul {
    display: none; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 0 4px; margin-top: 8px;
    border-top: 1px solid #eceae5;
  }
  .nav-wrap nav.open ul { display: flex; }
  .nav-wrap nav ul > li > a { display: block; padding: 12px 4px; font-size: 1rem; }
  .nav-wrap nav ul > li > a.btn { text-align: center; margin: 8px 0; }
  .nav-wrap nav ul > li.lang-switch { justify-content: center; margin: 6px 0 2px; }
  /* Mobile: dropdown opens on tap via :focus-within, stacked below parent */
  nav .dropdown {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    box-shadow: none; border-radius: 0; min-width: 0; padding: 0 0 6px 14px;
    background: transparent; display: none;
  }
  nav li.has-dropdown.open .dropdown { display: block; }
  nav li.has-dropdown:hover .dropdown,
  nav li.has-dropdown:focus-within .dropdown,
  nav li.has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: none; }
  nav .dropdown a { padding: 8px 6px; border-left: 2px solid #eceae5; }
  nav .drop-toggle .caret { float: right; margin-top: 8px; }
}


/* ===== Mobile refinements (round 2) ===== */
@media (max-width: 820px) {
  /* Grids collapse cleanly on narrow screens */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  /* Hero: smaller type, stacked full-width buttons */
  .hero h1 { font-size: clamp(1.6rem, 7.2vw, 2rem); }
  .hero p { font-size: 1rem; padding: 0 10px; }
  .hero .btn { display: block; width: 100%; max-width: 330px; margin: 0 auto; }
  .hero .btn + .btn { margin: 12px auto 0; }
  /* Tables scroll horizontally instead of breaking layout */
  table.spec { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Cards & banners breathe less on mobile */
  .page-banner { padding: 54px 0; }
  section { padding: 56px 0; }
}
/* Never allow accidental horizontal scroll */
html, body { overflow-x: hidden; }
