/*
Theme Name: Bao Bì Hoàng Huy
Theme URI: https://www.baobihoanghuy.com/
Author: Hoàng Huy
Description: Giao diện WordPress dành cho DNTN Bao Bì Hoàng Huy.
Version: 1.0.0
Text Domain: hoanghuy
*/

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/montserrat-vietnamese-400.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/montserrat-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/montserrat-vietnamese-700.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/montserrat-latin-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122;
}

:root {
    --cream: #fbf9f1;
    --green: #2a6049;
    --green-dark: #135700;
    --green-hover: #479e79;
    --brown: #ae633f;
    --ink: #191919;
    --white: #ffffff;
    --site-width: 980px;
    --wide-width: 1112px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--cream);
    color: var(--ink);
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

body.menu-is-open,
body.lightbox-is-open {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
    font: inherit;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 5000;
    padding: 10px 14px;
    transform: translateY(-150%);
    background: var(--white);
    color: var(--ink);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 144px;
    background: var(--cream);
}

.admin-bar .site-header {
    top: 32px;
}

.site-header__inner {
    display: flex;
    align-items: center;
    width: min(var(--site-width), calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
}

.site-brand {
    color: var(--green);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 250px;
    height: 39px;
    margin-left: auto;
}

.desktop-nav a {
    padding: 5px 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transition: color .4s ease;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.desktop-nav a.is-current {
    color: var(--green-hover);
}

.menu-toggle,
.mobile-menu {
    display: none;
}

.home-main,
.contact-page {
    width: 100%;
}

.hero-slider {
    position: relative;
    width: min(var(--wide-width), 100%);
    height: 640px;
    margin: 0 auto;
    overflow: hidden;
    background: #ddd;
}

.hero-slider__track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    margin: 0;
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    z-index: 1;
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slider__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 44px;
    height: 64px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--white);
    font-family: Arial, sans-serif;
    font-size: 54px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6));
}

.hero-slider__arrow--prev { left: 20px; }
.hero-slider__arrow--next { right: 20px; }

.services-section {
    width: min(var(--site-width), 100%);
    margin: 0 auto;
}

.services-section > h1 {
    margin: 39px auto 67px;
    color: var(--green);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.service-card,
.product-card {
    appearance: none;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.service-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.service-card > span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 81px;
    color: var(--ink);
    font-size: 25px;
    font-weight: 700;
    line-height: 31px;
    text-align: center;
}

.service-card img,
.product-card img {
    transition: transform .35s ease, filter .35s ease;
}

.service-card:hover img,
.service-card:focus-visible img,
.product-card:hover img,
.product-card:focus-visible img {
    transform: scale(1.025);
    filter: brightness(.9);
}

.services-mobile-divider,
.hotline-button--inline,
.hotline-button--contact {
    display: none;
}

.services-desktop-divider {
    width: 100%;
    height: 1px;
    margin: 54px 0 0;
    background: #706f6f;
}

.products-section {
    width: 100%;
    margin-top: 28px;
}

.products-panel {
    width: min(var(--wide-width), 100%);
    margin: 0 auto;
    padding: 79px 66px 30px;
    background: var(--white);
}

.products-intro {
    width: 836px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.products-intro h2 {
    margin: 0 0 32px;
    color: var(--green);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
}

.products-intro p {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 50px;
    width: 100%;
    margin: 65px auto 0;
}

.product-card {
    height: auto;
    overflow: hidden;
    background: var(--white);
    text-align: center;
}

.product-card > img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-card__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100px;
    padding: 18px 0 15px;
    background: var(--white);
    text-align: center;
}

.product-card__title {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    font-size: 25px;
    font-weight: 700;
    line-height: 31px;
}

.product-card__spec {
    display: block;
    width: 100%;
    font-size: 21px;
    line-height: 26px;
}

@media (min-width: 1113px) {
    .product-card:nth-child(6) {
        overflow: visible;
    }

    .product-card:nth-child(6) .product-card__title {
        white-space: nowrap;
    }
}

.features-section {
    display: grid;
    grid-template-columns: repeat(3, 259px);
    column-gap: 69px;
    width: var(--site-width);
    min-height: 308px;
    margin: 0 auto;
    padding: 56px 31px 70px;
}

.feature-card {
    position: relative;
    text-align: center;
}

.feature-card + .feature-card::before {
    position: absolute;
    top: -22px;
    bottom: -22px;
    left: -35px;
    width: 1px;
    background: var(--ink);
    content: '';
}

.feature-card__icon {
    margin: 0 auto;
    fill: var(--green-dark);
}

.feature-card__icon--price {
    width: 48px;
    height: 49px;
    margin-bottom: 20px;
}

.feature-card__icon--delivery {
    width: 66px;
    height: 43px;
    margin: 7px auto 20px;
}

.feature-card__icon--quality {
    width: 63px;
    height: 63px;
    margin: 0 auto 13px;
}

.feature-card h2 {
    margin: 0 0 6px;
    color: var(--green);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.feature-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
}

.hotline-button {
    align-items: center;
    justify-content: center;
    height: 42px;
    border-radius: 10px;
    background: var(--brown);
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    transition: filter .2s ease;
}

.hotline-button:hover,
.hotline-button:focus-visible {
    filter: brightness(.82);
}

.hotline-button svg {
    width: 35px;
    height: 35px;
    margin-left: 9px;
    fill: currentColor;
}

.hotline-button--floating {
    position: fixed;
    right: 90px;
    bottom: 37px;
    z-index: 900;
    display: flex;
    width: 172px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.site-footer {
    min-height: 416px;
    padding: 31px 0 10px;
    background: var(--cream);
}

.site-footer__panel {
    display: grid;
    grid-template-columns: 324px 44px 237px 68px 307px;
    column-gap: 0;
    width: min(var(--wide-width), 100%);
    margin: 0 auto;
    padding: 50px 66px;
    background: var(--green);
    color: var(--white);
}

.footer-block--address { grid-column: 1; }
.footer-block--hours { grid-column: 3; }
.footer-block--phone { grid-column: 5; }

.footer-block h2 {
    margin: 0 0 31px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.footer-block p {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
}

.footer-block--hours {
    text-align: center;
}

.footer-block--hours h2 {
    margin-bottom: 27px;
}

.footer-block--phone {
    text-align: right;
}

.footer-block--phone h2 {
    margin-bottom: 26px;
}

.footer-block--phone p {
    font-size: 20px;
}

.contact-page {
    padding-bottom: 58px;
}

.contact-page__panel {
    width: min(1110px, 100%);
    min-height: 1519px;
    margin: 0 auto;
    padding: 65px 65px 0;
    background: var(--white);
}

.contact-page__lead {
    width: 597px;
    max-width: 100%;
    margin: 0 auto 49px;
    font-size: 25px;
    line-height: 1.6;
    text-align: center;
}

.contact-page__lead a {
    text-decoration: none;
}

.contact-page__image {
    width: 980px;
    height: 735px;
    object-fit: cover;
}

.contact-page__map {
    display: block;
    width: 979px;
    max-width: 100%;
    height: 351px;
    border: 0;
}

.generic-page {
    width: min(980px, calc(100% - 40px));
    min-height: 50vh;
    margin: 0 auto;
    padding: 60px 0;
}

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: block;
    padding: 0;
    overflow: hidden;
    background: var(--white);
    color: #323232;
}

.lightbox__content {
    display: grid;
    grid-template-columns: 66.5% 33.5%;
    width: 100%;
    height: 100%;
}

.lightbox__figure {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 7vh 5vw 7vh 6vw;
}

.lightbox__image {
    width: auto;
    max-width: 78%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
}

.lightbox__details {
    min-width: 0;
    padding: 22vh 5vw 8vh 4vw;
}

.lightbox__caption {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 1.65vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.lightbox__description {
    margin: 14px 0 0;
    color: #555;
    font-size: 18px;
    line-height: 1.5;
}

.lightbox__close,
.lightbox__nav,
.lightbox__fullscreen {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3f3f3f;
    cursor: pointer;
}

.lightbox__close {
    top: 36px;
    right: 26px;
    width: 46px;
    height: 46px;
}

.lightbox__close svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
}

.lightbox__fullscreen {
    top: 32px;
    left: 18px;
    width: 44px;
    height: 44px;
}

.lightbox__fullscreen svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-width: 1.35;
}

.lightbox__nav {
    top: 50%;
    width: 48px;
    height: 70px;
    transform: translateY(-50%);
}

.lightbox__nav svg {
    width: 20px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-linejoin: miter;
    stroke-width: 1.35;
}

.lightbox__nav--prev {
    left: 24px;
}

.lightbox__nav--next {
    right: calc(33.5% + 24px);
}

.lightbox__nav[hidden] {
    display: none;
}

.lightbox__close:hover,
.lightbox__close:focus-visible,
.lightbox__fullscreen:hover,
.lightbox__fullscreen:focus-visible,
.lightbox__nav:hover,
.lightbox__nav:focus-visible {
    color: #000;
}

.lightbox__close:focus-visible,
.lightbox__fullscreen:focus-visible,
.lightbox__nav:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

@media (max-width: 1112px) and (min-width: 768px) {
    .site-header__inner {
        width: calc(100% - 60px);
    }

    .site-brand {
        font-size: clamp(30px, 4.1vw, 48px);
    }

    .desktop-nav {
        width: 250px;
    }

    .services-section,
    .features-section {
        width: min(980px, calc(100% - 40px));
    }

    .features-section {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 7vw;
    }

    .site-footer__panel {
        grid-template-columns: 1.25fr .9fr 1fr;
        column-gap: 35px;
        padding-inline: 40px;
    }

    .footer-block--address,
    .footer-block--hours,
    .footer-block--phone {
        grid-column: auto;
    }
}

@media (max-width: 767px) {
    .admin-bar .site-header {
        top: 46px;
    }

    .site-header {
        height: 101px;
    }

    .site-header__inner {
        width: 100%;
        padding: 0 20px;
    }

    .site-brand {
        max-width: 230px;
        font-size: 21px;
        line-height: 1.2;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        position: relative;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        margin-left: auto;
        padding: 0 10px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 30px;
        height: 3px;
        margin: 3px 0;
        background: var(--ink);
    }

    .mobile-menu {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 1100;
        display: block;
        width: min(320px, 100%);
        height: 100dvh;
        transform: translateX(105%);
        background: var(--cream);
        transition: transform .35s ease;
    }

    .menu-is-open .mobile-menu {
        transform: translateX(0);
    }

    .mobile-menu__close {
        position: absolute;
        top: 22px;
        right: 20px;
        width: 50px;
        height: 50px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--ink);
        font-family: Arial, sans-serif;
        font-size: 42px;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-menu nav {
        display: flex;
        flex-direction: column;
        width: 188px;
        margin: 136px auto 0;
    }

    .mobile-menu nav a {
        height: 40px;
        color: var(--green);
        font-size: 20px;
        font-weight: 700;
        line-height: 40px;
        text-align: center;
    }

    .mobile-menu nav a.is-current {
        color: var(--green-hover);
    }

    .hero-slider {
        width: 100%;
        height: auto;
        aspect-ratio: 320 / 188;
    }

    .hero-slider__arrow {
        width: 34px;
        height: 50px;
        font-size: 40px;
    }

    .hero-slider__arrow--prev { left: 4px; }
    .hero-slider__arrow--next { right: 4px; }

    .services-section {
        width: 100%;
        padding: 0 20px;
    }

    .services-section > h1 {
        margin: 28px 0 14px;
        font-size: 21px;
        line-height: 1.2;
    }

    .services-mobile-divider {
        display: block;
        width: 100%;
        height: 1px;
        margin-bottom: 10px;
        background: #706f6f;
    }

    .services-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .service-card {
        height: 361px;
    }

    .service-card img {
        width: 100%;
        height: 280px;
    }

    .service-card > span {
        height: 81px;
        font-size: 20px;
        line-height: 25px;
    }

    .services-desktop-divider {
        display: none;
    }

    .hotline-button--inline,
    .hotline-button--contact {
        display: flex;
        width: 160px;
        margin: 0 auto 31px;
    }

    .products-section {
        margin-top: 17px;
    }

    .products-panel {
        width: 100%;
        min-height: 0;
        padding: 0;
        background: transparent;
    }

    .products-intro {
        width: 100%;
        padding: 22px 20px 38px;
        background: var(--white);
    }

    .products-intro h2 {
        margin-bottom: 10px;
        font-size: 20px;
        line-height: 1.2;
    }

    .products-intro p {
        font-size: 20px;
        line-height: 1.2;
    }

    .product-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        margin: 0;
        padding: 0 20px 20px;
    }

    .product-card {
        display: flex;
        width: 100%;
        height: 130px;
    }

    .product-card > img {
        order: 2;
        flex: 0 0 130px;
        width: 130px;
        height: 130px;
    }

    .product-card__info {
        order: 1;
        flex: 0 0 150px;
        align-items: center;
        justify-content: flex-start;
        width: 150px;
        height: 130px;
        padding: 15px 0;
    }

    .product-card__info strong,
    .product-card__info > span {
        font-size: 15px;
        line-height: 18px;
    }

    .product-card__info strong {
        margin-bottom: 6px;
    }

    .features-section {
        display: flex;
        flex-direction: column;
        gap: 33px;
        width: 320px;
        min-height: 596px;
        padding: 26px 30px 10px;
    }

    .feature-card {
        width: 259px;
    }

    .feature-card + .feature-card::before {
        display: none;
    }

    .feature-card__icon--price { margin-bottom: 25px; }
    .feature-card__icon--delivery { margin-bottom: 17px; }
    .feature-card__icon--quality { width: 54px; margin-bottom: 6px; }

    .feature-card h2 {
        margin-bottom: 9px;
    }

    .feature-card p {
        line-height: 1.25;
    }

    .hotline-button--floating {
        display: none;
    }

    .site-footer {
        min-height: 0;
        padding: 10px 0 0;
    }

    .site-footer__panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 0;
        padding: 53px 10px 48px;
    }

    .footer-block {
        width: 100%;
        text-align: center;
    }

    .footer-block h2 {
        margin: 0 0 17px;
        font-size: 23px;
    }

    .footer-block p {
        font-size: 14px;
        line-height: 1.8;
    }

    .footer-block--address {
        margin-bottom: 41px;
    }

    .footer-block--hours {
        width: 280px;
        margin: 0 auto 35px;
    }

    .footer-block--hours h2 {
        margin-bottom: 10px;
    }

    .footer-block--phone h2 {
        margin-bottom: 6px;
    }

    .footer-block--phone p {
        font-size: 19px;
    }

    .contact-page {
        padding: 20px 20px 0;
    }

    .contact-page__panel {
        width: 280px;
        min-height: 0;
        padding: 10px 0 0;
    }

    .contact-page__lead {
        width: 260px;
        margin-bottom: 39px;
        font-size: 19px;
        line-height: 1.6;
    }

    .hotline-button--contact {
        margin-bottom: 44px;
    }

    .contact-page__image {
        width: 280px;
        height: 210px;
    }

    .contact-page__map {
        width: 280px;
        height: 287px;
    }

    .lightbox__content {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .lightbox__figure {
        height: auto;
        padding: 74px 42px 12px;
    }

    .lightbox__image {
        max-width: 100%;
        max-height: 66vh;
    }

    .lightbox__details {
        padding: 18px 24px 32px;
    }

    .lightbox__caption {
        font-size: 23px;
        text-align: center;
    }

    .lightbox__description {
        margin-top: 8px;
        font-size: 16px;
        text-align: center;
    }

    .lightbox__close {
        top: 16px;
        right: 12px;
    }

    .lightbox__fullscreen {
        top: 16px;
        left: 10px;
    }

    .lightbox__nav {
        top: 48%;
        width: 38px;
        height: 56px;
    }

    .lightbox__nav--prev {
        left: 5px;
    }

    .lightbox__nav--next {
        right: 5px;
    }
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
