/* ============================================================
   Packagly — responsive.css
   ALL @media rules, in document order. Load LAST on every page,
   after common.css + the section css files.
   ============================================================ */

@media (max-width: 1199.98px) {
  .topbar-shipping {
    font-size: 11.5px;
  }
  .topbar-link {
    font-size: 12.5px;
  }
}
@media (max-width: 991.98px) {
  .topbar-center {
    display: none !important;
  }
}
@media (max-width: 767.98px) {
  .topbar-inner {
    gap: 10px;
  }
  .topbar-shipping span {
    font-size: 10.5px;
    letter-spacing: 0.2px;
  }
  .topbar-socials li a {
    width: 24px;
    height: 24px;
  }
  .topbar-socials .icon-sm {
    width: 14px;
    height: 14px;
  }
}
@media (max-width: 480px) {
  .topbar-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 0;
  }
  .topbar-left,
  .topbar-socials {
    width: auto;
    margin: 0 !important;
  }
  .topbar-shipping span {
    font-size: 10px;
  }
}
@media (max-width: 575.98px) {
  .search-submit {
    display: none;
  }
}
@media (min-width: 992px) {
  .main-menu li.has-dropdown:hover > .submenu,
  .main-menu li.has-dropdown:focus-within > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
@media (max-width: 991.98px) {
  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(340px, 88vw);
    height: 100vh;
    background: #0b2316;
    z-index: 1100; /* above the sticky header + backdrop */
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    /* closed: not rendered at all -> a fixed drawer can't be reached by
       horizontal scroll (overflow:clip does NOT clip fixed elements) */
    display: none;
  }
  .primary-nav.is-open {
    display: flex;
    animation: navSlideIn 0.3s ease;
  }
  @keyframes navSlideIn {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }

  .primary-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .primary-nav-header .brand-logo img {
    height: 34px;
  }

  .main-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 12px 28px;
  }
  .main-menu > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .main-menu > li:last-child {
    border-bottom: none;
  }

  .main-menu > li.is-active > a::after {
    display: none;
  }

  .main-menu a,
  .menu-link {
    padding: 14px 8px;
    width: 100%;
    justify-content: space-between;
    font-size: 14px;
  }

  .submenu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(112, 174, 19, 0.05);
    padding: 4px 0 4px 12px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    transition: none;
    min-width: 0;
  }
  .submenu .submenu {
    left: 0;
    top: 0;
  }
  .has-dropdown.is-open > .submenu {
    display: block;
  }
  .has-dropdown.is-open > a > .chev {
    transform: rotate(180deg);
  }

  .submenu li a {
    padding: 10px 8px;
    font-size: 13.5px;
  }
  .submenu .chev-right {
    transform: rotate(0);
  }
  .submenu .has-dropdown.is-open > a > .chev-right {
    transform: rotate(180deg);
  }
}
@media (min-width: 992px) {
  .primary-nav-header {
    display: none !important;
  }
  /* center the menu in the navbar (logo stays left, actions stay right) */
  .main-header-inner {
    position: relative;
  }
  .primary-nav {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
@media (max-width: 575.98px) {
  .header-actions .btn-quote {
    display: none !important;
  }
  .main-header-inner {
    min-height: 68px;
    padding: 10px 0;
  }
  .brand-logo img {
    height: 34px;
  }
}
@media (max-width: 991.98px) {
  .hero-banner {
    padding: 40px 0 50px;
    text-align: center;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-features {
    justify-content: center;
  }
  .hero-visual {
    margin-top: 16px;
  }
}
@media (max-width: 575.98px) {
  .hero-banner {
    padding: 30px 0 40px;
  }
  .hero-title {
    font-size: 38px;
    letter-spacing: -0.8px;
  }
  .hero-desc {
    font-size: 15px;
  }

  .hero-features {
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
  }
  .hero-features > li:not(.feature-divider) {
    width: 100%;
    justify-content: center;
  }
  .feature-divider {
    display: none !important;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-cta-green,
  .btn-cta-outline {
    width: 100%;
    justify-content: center;
  }
}
/* ---- mobile: hide the hero text/decor, show only the banner image ---- */
@media (max-width: 767.98px) {
  .hero-wrap {
    margin-top: 0;
    padding-top: 0;
  }
  .hero-bg,
  .hero-glow,
  .hero-banner {
    display: none;
  }
  .hero-mobile-banner {
    display: block;
    width: 100%;
    height: auto;
  }
}
@media (max-width: 991.98px) {
  .product-card {
    flex: 0 0 calc((100% - 48px) / 3); /* 3 per row */
  }
}
@media (max-width: 767.98px) {
  .products-section {
    padding: 52px 0;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .product-card {
    flex: 0 0 calc((100% - 24px) / 2); /* 2 per row */
  }
}
@media (max-width: 575.98px) {
  .products-track {
    gap: 14px;
  }
  .product-card {
    flex: 0 0 calc((100% - 14px) / 2); /* 2 per row on mobile */
  }
  .btn-view-all {
    margin-left: auto; /* keep arrows left, view-all wraps to the right */
  }
  .product-body {
    padding: 13px;
  }
}
@media (max-width: 1199.98px) {
  .feature-col {
    padding: 15px 16px;
    gap: 10px;
  }
  .feature-title {
    font-size: 13px;
  }
  .feature-sub {
    font-size: 11.5px;
  }
}
@media (max-width: 991.98px) {
  .features-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  /* reset divider rules for 3 columns */
  .feature-col {
    border-left: 1px solid #e7ece8;
    border-top: 1px solid #e7ece8;
  }
  .feature-col:nth-child(5n + 1) {
    border-left: 1px solid #e7ece8;
  }
  .feature-col:nth-child(3n + 1) {
    border-left: none;
  }
  .feature-col:nth-child(-n + 3) {
    border-top: none; /* first row */
  }
}
@media (max-width: 575.98px) {
  .features-section {
    padding: 0 0 52px;
  }
  .features-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-col {
    padding: 20px 16px;
    border-left: 1px solid #e7ece8;
    border-top: 1px solid #e7ece8;
  }
  .feature-col:nth-child(3n + 1),
  .feature-col:nth-child(5n + 1) {
    border-left: 1px solid #e7ece8;
  }
  .feature-col:nth-child(2n + 1) {
    border-left: none;
  }
  .feature-col:nth-child(-n + 2) {
    border-top: none; /* first row */
  }
  .f-ico {
    width: 38px;
    height: 38px;
  }
  .f-ico .icon {
    width: 30px;
    height: 30px;
  }
}
@media (max-width: 1199.98px) {
  .why-top {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "intro intro"
      "video stats";
  }
}
@media (max-width: 991.98px) {
  .quote-faq {
    grid-template-columns: minmax(0, 1fr);
  }
  .qf-quote {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}
@media (max-width: 767.98px) {
  .why-choose {
    padding: 52px 0;
  }
  .why-top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "video"
      "stats";
  }
  .video-card {
    min-height: 240px;
  }
  .qf-col {
    padding: 26px 20px;
  }
}
@media (max-width: 575.98px) {
  .why-features {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .qf-captcha {
    flex: 1 1 100%;
    min-width: 0;
  }
  .qf-cap-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0; /* let the answer field shrink instead of overflowing */
  }
  .faq-help {
    justify-content: center;
    text-align: center;
  }
  .faq-help-text {
    text-align: center;
  }
}
@media (max-width: 991.98px) {
  .review-card {
    flex: 0 0 calc((100% - 24px) / 2); /* 2 per view */
  }
}
@media (max-width: 767.98px) {
  .reviews-section {
    padding: 52px 0;
  }
  .reviews-carousel {
    padding: 0 46px;
  }
  .reviews-arrow {
    width: 40px;
    height: 40px;
  }
  .review-card {
    flex: 0 0 100%; /* 1 per view */
  }
}
@media (max-width: 479.98px) {
  .reviews-carousel {
    padding: 0 6px;
  }
  .reviews-arrow.prev {
    left: 2px;
  }
  .reviews-arrow.next {
    right: 2px;
  }
}
@media (max-width: 1199.98px) {
  .about-main {
    grid-template-columns: 1fr 1fr;
  }
  .about-mv {
    grid-column: 1 / -1;
  }
  .about-dots {
    display: none;
  }
}
@media (max-width: 991.98px) {
  .about-panel {
    padding: 36px 28px;
    border-radius: 22px;
  }
  .about-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .about-image {
    min-height: 340px;
  }
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px 0;
  }
  .as-item:nth-child(3) {
    border-right: none;
  }
}
@media (max-width: 575.98px) {
  .about-section {
    padding: 16px 0;
  }
  .about-panel {
    padding: 28px 18px;
  }
  .about-features {
    grid-template-columns: 1fr;
  }
  .about-badge {
    width: 104px;
    height: 104px;
    left: 50%;
    transform: translateX(-50%);
    bottom: -18px;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
  .as-item {
    border-right: none;
    justify-content: flex-start;
  }
}
@media (max-width: 1199.98px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 767.98px) {
  .blog-section {
    padding: 52px 0;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .finishes-track {
    animation: none;
  }
}
@media (max-width: 991.98px) {
  .finish-card {
    width: 160px;
  }
  .finishes-explore {
    flex-basis: 168px;
  }
  .finishes-explore-text {
    font-size: 16px;
  }
}
@media (max-width: 575.98px) {
  .finishes-section {
    padding: 48px 0;
  }
  .finishes-row {
    flex-direction: column;
  }
  .finish-card {
    width: 150px;
  }
  /* button drops below the scroller, full width */
  .finishes-explore {
    flex-basis: auto;
    width: 100%;
    aspect-ratio: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
@media (prefers-reduced-motion: reduce) {
  .factory-track {
    animation: none;
  }
}
@media (max-width: 991.98px) {
  .factory-inner {
    flex-direction: column;
  }
  .factory-intro {
    flex-basis: auto;
    max-width: none;
    padding: 40px 24px 28px;
  }
  /* show 2 at a time on tablet/phone */
  .factory-card {
    width: 50cqw;
  }
}
@media (max-width: 575.98px) {
  .factory-card img {
    height: 160px;
  }
}
@media (max-width: 1199.98px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    row-gap: 40px;
  }
}
@media (max-width: 767.98px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 479.98px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ============================================================
   PRODUCT PAGE (product.css) — responsive overrides
   ============================================================ */
@media (max-width: 991.98px) {
  .product-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 767.98px) {
  /* main image on top, thumbnails become a horizontal rail below */
  .gallery {
    flex-direction: column-reverse;
  }
  .gallery-thumbs {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    flex-direction: row;
  }
  .thumb-nav {
    display: none;
  }
  .thumb-strip {
    flex-direction: row;
    width: 100%;
    min-width: 0; /* let the rail shrink so it scrolls instead of widening the page */
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .thumb {
    flex: 0 0 74px;
    width: 74px;
    scroll-snap-align: start;
  }
}
@media (max-width: 479.98px) {
  /* keep feature cards 2-up even on small screens */
  .feature-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .feature-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .feature-card img {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .feature-card span {
    font-size: 12px;
  }
  .steps {
    gap: 2px;
  }
  .step-ico {
    width: 54px;
    height: 54px;
  }
  .step-label {
    font-size: 11.5px;
  }
}

/* ============================================================
   PRODUCT — SPECIFICATIONS + QUOTE FORM responsive
   ============================================================ */
@media (max-width: 991.98px) {
  .sq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 575.98px) {
  /* stack label over value, icon spans both rows */
  .spec-row {
    grid-template-columns: 38px 1fr;
    grid-template-areas:
      "ico label"
      "ico value";
    align-items: start;
    row-gap: 2px;
    padding: 12px 14px;
  }
  .spec-ico {
    grid-area: ico;
    align-self: start;
  }
  .spec-label {
    grid-area: label;
    border-right: none;
    padding-right: 0;
  }
  .spec-value {
    grid-area: value;
    padding: 0 0 2px;
  }

  .qf-3 {
    grid-template-columns: 1fr;
  }
  .qf-size {
    grid-template-columns: 1fr 1fr;
  }
  .qf-2 {
    grid-template-columns: 1fr;
  }
  .quote-head,
  .quote-form {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ============================================================
   PRODUCT — WORLDWIDE DELIVERY BANNER responsive
   ============================================================ */
@media (max-width: 991.98px) {
  .wwd-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 18px;
    padding: 26px 24px;
  }
  .wwd-sep {
    display: none;
  }
  .wwd-text {
    max-width: 480px;
    margin: 0 auto;
  }
  .wwd-ship {
    justify-content: center;
  }
  .wwd-art {
    justify-self: center;
    align-self: auto;
  }
  .wwd-art img {
    height: 150px;
  }
  /* 4 -> 2 columns */
  .wwd-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .wwd-feat {
    border-left: 1px solid #e3e8e2;
    border-top: 1px solid #e3e8e2;
  }
  .wwd-feat:nth-child(2n + 1) {
    border-left: none;
  }
  .wwd-feat:nth-child(-n + 2) {
    border-top: none;
  }
}
@media (max-width: 575.98px) {
  .wwd-top {
    padding: 22px 18px;
  }
  .wwd-art img {
    height: 120px;
  }
  .wwd-feat {
    padding: 14px 14px;
    gap: 10px;
  }
  .wwd-feat-ico {
    width: 40px;
    height: 40px;
  }
  .wwd-feat-ico img {
    width: 19px;
    height: 19px;
  }
  .wwd-feat-text strong {
    font-size: 13px;
  }
  .wwd-feat-text small {
    font-size: 11.5px;
  }
}

/* ============================================================
   PRODUCT — FAQ responsive
   ============================================================ */
@media (max-width: 767.98px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .faq-col {
    gap: 12px;
  }
}
@media (max-width: 575.98px) {
  .faq-deco {
    width: 26px;
  }
  .faq-a-inner {
    padding-left: 18px;
  }
  .faq-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
  }
  .faq-cta-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   PRODUCT — DETAILS / DESCRIPTION responsive
   ============================================================ */
@media (max-width: 991.98px) {
  .details-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  /* no sticky when stacked */
  .details-visual {
    position: static;
    top: auto;
  }
  /* feature strip -> separate cards (3 up) */
  .details-features {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: transparent;
    border: none;
  }
  .df-item {
    border: 1px solid #e7ebe7;
    border-radius: 12px;
    background: #f4f6f4;
  }
  .df-item:first-child {
    border-left: 1px solid #e7ebe7;
  }
}
@media (max-width: 575.98px) {
  .details-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .dv-body {
    max-width: 100%;
  }
  .dv-art {
    display: none;
  }
  .dv-badges {
    grid-template-columns: repeat(2, 1fr);
  }
  .details-collapse.is-collapsed {
    max-height: 460px;
  }
}

/* ============================================================
   PRODUCT — RELATED PRODUCTS slider responsive
   (card widths/visible-count are handled in product.js)
   ============================================================ */
@media (max-width: 767.98px) {
  .related-thumb {
    height: 132px;
  }
}
@media (max-width: 575.98px) {
  .related-section {
    padding: 8px 0 52px;
  }
  .related-thumb {
    height: 120px;
  }
  .related-name {
    font-size: 12.5px;
  }
}
