 /* PRODUCTS SECTION STYLES */

#products {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #f4f4f4;
    padding-block: 5rem;
    padding-inline: var(--hero-align-x, clamp(0.9rem, 3.4vw, 4.5rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@supports (-webkit-touch-callout: none) {
    #products {
        min-height: -webkit-fill-available;
    }
}

#products-mobile {
    background-color: #f4f4f4;
    padding-block: clamp(2.5rem, 6vw, 4rem);
    padding-inline: var(--hero-align-x, clamp(0.9rem, 3.4vw, 4.5rem));
    display: none;
}

@media (max-width: 768px), (orientation: portrait) and (max-width: 1024px) {
    #products {
        display: none;
    }

    #products-mobile {
        display: block;
    }
}

@media (orientation: portrait) and (max-width: 1024px) {
    #products {
        display: none;
    }

    #products-mobile {
        display: block;
    }
}

/* Product card styles (desktop/gallery) */
.gallery-card {
    height: clamp(520px, 38vw, 720px);
    overflow: hidden;
    position: relative;
    aspect-ratio: unset;
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (hover: none), (pointer: coarse) {
    .gallery-card {
        cursor: default;
    }
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-card:hover .drawer {
    transform: translateX(0);
}

.gallery-card .drawer {
    transform: translateX(-100%);
    background-color: #f64900;
    overflow: hidden;
    padding: clamp(1rem, 2vw, 2.5rem); 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: absolute;
    inset: 0;
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-card .drawer .drawer-title {
    font-size: clamp(1.4rem, 2.2vw, 3.2rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: white;
}

.gallery-card .drawer ul {
    list-style: none;
    padding: 0;
    margin: clamp(0.7rem, 0.95vw, 1.1rem) 0;
}

.gallery-card .drawer ul li {
    padding: clamp(0.2rem, 0.3vw, 0.4rem) clamp(0.4rem, 0.7vw, 0.9rem);
    font-size: clamp(0.45rem, 0.58vw, 0.65rem);
    border-radius: 999px;
    background: #ffffff;
    margin-bottom: 0.5rem;
    color: #f64900;
}

.gallery-card .drawer p {
    font-size: clamp(0.58rem, 0.75vw, 0.9rem);
    line-height: 1.45;
    transition: opacity 0.25s ease, transform 0.35s ease;
    /* color: rgba(255, 255, 255, 0.9); */
}

.gallery-card .drawer p {
    opacity: 0.96;
    transform: translateY(6px);
}

.gallery-card:hover .drawer p {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card .drawer hr {
    margin: clamp(0.3rem, 0.8vw, 1rem) 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.gallery-card .drawer .mono {
    font-size: clamp(0.5rem, 0.55vw, 0.65rem);
    margin-bottom: clamp(0.3rem, 0.5vw, 0.75rem);
}

.gallery-card-title {
    font-size: clamp(1.4rem, 1.9vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.02em;
    font-weight: 900;
}

.gallery-card-subtitle {
    font-size: clamp(0.62rem, 0.7vw, 0.74rem);
    color: #ff8904;
}

@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .gallery-card {
        cursor: default;
    }
}

/* Background images for gallery cards */
#gallery-card-rigid-box {
    background-image: url('../resources/rigidbox.webp');
    background-size: cover;
    background-position: center;
}

#gallery-card-mono-box {
    background-image: url('../resources/mono-carton.webp');
    background-size: cover;
    background-position: center;
}

#gallery-card-paperboard {
    background-image: url('../resources/paperboard-bags.webp');
    background-size: cover;
    background-position: center;
}

/* Mobile product card styles */
/*  Mobile Products Accordion  */
#products-mobile > .reveal h2 {
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    margin-bottom: 0.45rem;
}

#products-mobile > .reveal h3 {
    font-size: clamp(1.9rem, 7.8vw, 2.6rem);
    line-height: 0.95;
}

#products-mobile .border {
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#products-mobile .border.open {
    border-color: rgba(246, 73, 0, 0.5);
    box-shadow: 0 14px 30px rgba(246, 73, 0, 0.15);
}

/* Image header: ensure it always renders */
#products-mobile .border > .relative {
    height: clamp(9.25rem, 35vw, 12rem);
    position: relative;
    display: block;
}

#products-mobile .border > .relative img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;         /* prevents inline baseline gap */
}

/* Dark overlay */
#products-mobile .border > .relative .bg-black\/50 {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.62) 100%);
    z-index: 1;
}

/* Button sits above overlay */
#products-mobile .accordion-btn {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem 0 1.1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    width: 100%;
}

#products-mobile .accordion-btn h3 {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
}

/* The + /  indicator */
#products-mobile .accordion-btn .toggle-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
    transition: transform 0.35s ease, background 0.25s ease, border-color 0.25s ease;
}

/* Rotate when open */
#products-mobile .border.open .accordion-btn .toggle-icon {
    transform: rotate(45deg);   /* + becomes  */
}

/* Accordion body: hidden by default */
#products-mobile .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Open state */
#products-mobile .border.open .accordion-content {
    max-height: 200px;          /* enough for any description */
}

/* Inner text padding */
#products-mobile .accordion-content > div {
    padding: 1rem 1.1rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.65;
    text-align: left;
    color: #334155;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

#products-mobile .border.open .accordion-btn .toggle-icon {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(246, 73, 0, 0.75);
}

@media (min-width: 640px) and (max-width: 768px), (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    #products-mobile {
        padding-inline: var(--hero-align-x, clamp(0.9rem, 3.4vw, 4.5rem));
        padding-top: 3rem;
        padding-bottom: 3.5rem;
    }

    #products-mobile > .reveal h2 {
        font-size: 0.68rem;
        letter-spacing: 0.38em;
    }

    #products-mobile > .reveal h3 {
        font-size: clamp(2.1rem, 5.2vw, 2.9rem);
    }

    #products-mobile .border > .relative {
        height: 13rem;
    }

    #products-mobile .accordion-btn {
        padding-inline: 1.3rem;
    }

    #products-mobile .accordion-content > div {
        padding: 1.15rem 1.3rem 1.25rem;
        font-size: 0.94rem;
    }
}

@media (max-width: 480px) {
    #products-mobile {
        padding-inline: var(--hero-align-x, clamp(0.9rem, 3.4vw, 4.5rem));
    }

    #products-mobile > .reveal h3 {
        font-size: clamp(1.7rem, 8.8vw, 2.2rem);
    }

    #products-mobile .accordion-btn h3 {
        font-size: 1rem;
    }

    #products-mobile .accordion-btn .toggle-icon {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 1rem;
    }

    #products-mobile .accordion-content > div {
        font-size: 0.82rem;
    }
}


