/* Homepage presentation is shared by the server-rendered and enhanced carousel states. */
#content .homeproduct.flash-sales-section { background: color-mix(in srgb, var(--store-primary) 8%, var(--store-surface)); border-block: 1px solid var(--home-line); }
#content .homeproduct.flash-sales-section .section-title-header {
    padding: 22px 24px !important; border: 0; border-radius: 12px !important;
    background: var(--store-primary) !important; color: var(--store-on-primary);
}
#content .homeproduct.flash-sales-section .section-title-header .section-title-name { color: var(--store-on-primary) !important; display: inline-flex; align-items: center; gap: 12px; }
#content .flash-sales-section .section-title-name i { font-size: 22px; color: inherit; }
#content .flash-sales-section .timer_inner > div:last-child { display: flex; align-items: center; gap: 14px; }
#content .flash-sales-section .flash-countdown-label { color: var(--store-on-primary); font-size: 12px; font-weight: 500; white-space: nowrap; }
#content .flash-sales-section .offer_timer .syotimer-cell { background: var(--store-surface); border: 0; border-radius: 8px; width: auto !important; min-width: 44px; padding: 6px; }
#content .flash-sales-section .offer_timer .syotimer-cell__value { color: var(--store-primary); font-size: 16px; font-weight: 700; width: auto; }
#content .flash-sales-section .offer_timer .syotimer-cell__unit { color: var(--store-text); }
@media (max-width: 599px) {
    #content .homeproduct.flash-sales-section .section-title-header { padding: 18px !important; }
    #content .flash-sales-section .timer_inner { flex-wrap: wrap; gap: 16px; }
    #content .flash-sales-section .timer_inner > div:last-child { width: 100%; justify-content: space-between; }
}
#content {
    --home-radius: 12px;
    --home-inset-radius: 8px;
    --home-primary-wash: color-mix(in srgb, var(--store-primary) 5%, var(--store-surface));
    --home-secondary-wash: color-mix(in srgb, var(--store-secondary) 5%, var(--store-surface));
    --home-line: color-mix(in srgb, var(--store-primary) 14%, var(--store-surface));
}
#content .homeproduct {
    padding: 32px 0 !important;
    margin: 0 !important;
    background: var(--home-primary-wash);
}
#content .homeproduct > .container,
#content .home-ad-section > .container { max-width: 1240px; }
#content .homeproduct .sec_title { margin: 0 0 22px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#content .homeproduct .section-title-header {
    padding: 0 0 16px !important;
    margin: 0;
    min-height: 0;
    border: 0;
    border-bottom: 1px solid var(--home-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
#content .homeproduct .section-title-header .section-title-name {
    padding: 0 !important;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 600;
    text-transform: none;
    letter-spacing: -.4px;
    color: var(--store-text) !important;
}
#content .homeproduct .section-title-name::before,
#content .homeproduct .section-title-name::after { display: none !important; }
#content .timer_inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
#content .offer_timer .syotimer__body { border: 0; background: transparent; box-shadow: none; padding: 0; }
#content .offer_timer .syotimer-cell { box-shadow: none; border: 1px solid var(--store-border); border-radius: 6px; background: var(--store-surface); }
#content .offer_timer { min-width: 156px; min-height: 48px; padding: 0; border: 0; background: transparent; box-shadow: none; }
#content .homeproduct .product_item {
    padding: 12px;
    border: 1px solid var(--store-border);
    border-radius: 12px;
    background: var(--store-surface);
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color .18s ease;
}
#content .homeproduct .product_item:hover {
    border-color: var(--store-primary);
    box-shadow: none;
    transform: none;
}
#content .homeproduct .product_item_inner { flex: 1; }
#content .homeproduct .product_item .pro_img {
    margin: 0;
    border-radius: 8px;
    aspect-ratio: 1;
    height: auto;
    background: var(--store-canvas);
}
#content .homeproduct .pro_img a { display: block; height: 100%; }
#content .homeproduct .pro_img img {
    width: 100%;
    height: 100% !important;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    transform: none;
}
#content .homeproduct .pro_des { padding: 14px 0 0; text-align: left; }
#content .homeproduct .pro_name { height: 44px; margin: 0 0 10px; }
#content .homeproduct .pro_name a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: var(--store-text) !important;
}
#content .homeproduct .pro_name a:hover { color: var(--store-primary); }
#content .homeproduct .pro_price { margin: 0; padding: 0; }
#content .homeproduct .pro_price p {
    text-align: left;
    margin: 0;
    color: var(--store-primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
}
#content .homeproduct .pro_price del {
    color: var(--store-muted);
    font-size: 12px;
    font-weight: 400;
    margin-right: 8px;
}
#content .homeproduct .product-sold-count {
    display: inline-block;
    padding: 0 !important;
    margin: 0 0 8px;
    font-size: 11px;
    color: var(--store-muted);
    background: transparent;
}
#content .homeproduct .sale-badge { top: 20px; left: 20px; }
#content .homeproduct .sale-badge-box {
    padding: 4px 8px;
    border-radius: 5px;
    background: var(--store-primary);
    color: var(--store-on-primary);
    box-shadow: none;
}
#content .homeproduct .sale-badge-text { font-size: 11px; }
#content .homeproduct .sale-badge-inner::before,
#content .homeproduct .sale-badge::before,
#content .homeproduct .sale-badge::after,
#content .homeproduct .sale-badge-text::before,
#content .homeproduct .sale-badge-text::after,
#content .homeproduct .sale-badge-inner::after,
#content .homeproduct .sale-badge-box::before,
#content .homeproduct .sale-badge-box::after { display: none; }
#content .homeproduct .product-sold-count { background: transparent !important; }
#content .offer_timer .syotimer-cell,
#content .offer_timer .syotimer-cell__value,
#content .offer_timer .syotimer-cell__unit { box-shadow: none !important; }
#content .homeproduct .pro_btn { margin: 16px 0 0; padding: 0; gap: 8px; }
#content .homeproduct .pro_btn > form:last-child,
#content .homeproduct .pro_btn > .cart-icon-link { flex-basis: 42px; max-width: 42px; }
#content .homeproduct .pro_btn button,
#content .homeproduct .pro_btn > a {
    min-height: 42px;
    height: 42px;
    border-radius: 6px;
    font-size: 13px;
    box-shadow: none !important;
    transform: none !important;
}
#content .homeproduct .cart-icon-btn,
#content .homeproduct .cart-icon-link {
    background: transparent !important;
    border: 1px solid var(--store-border) !important;
    color: var(--store-primary) !important;
}
#content .homeproduct .cart-icon-btn:hover,
#content .homeproduct .cart-icon-link:hover {
    border-color: var(--store-secondary) !important;
    color: var(--store-secondary) !important;
}
#content .homeproduct .cart-icon-btn i,
#content .homeproduct .cart-icon-link i,
#content .homeproduct .cart-icon-btn svg,
#content .homeproduct .cart-icon-link svg { font-size: 16px; color: var(--store-primary) !important; }
#content .homeproduct .category-product,
#content .homeproduct .product_sliders {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}
#content .homeproduct .view_more_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 24px;
    padding: 0 24px;
    border: 1px solid var(--store-primary);
    border-radius: 6px;
    color: var(--store-primary) !important;
    background: var(--store-surface) !important;
    box-shadow: none;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
#content .homeproduct .view_more_btn:hover {
    border-color: var(--store-primary) !important;
    background: var(--store-primary) !important;
    color: #fff !important;
}
#content .homeproduct .view_more_btn :is(i, svg) { color: inherit !important; }
#content .homeproduct .show_more_btn {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Homepage merchandising is intentionally capped at two visual rows. The
   controller supplies up to ten items; narrower layouts expose only the
   number that fits two rows at their responsive column count. */
@media (min-width: 1000px) {
    #content :is(.all-products-section, .category-product-section)
    :is(.category-product, .product_sliders) > .product_item:nth-child(n + 11) {
        display: none;
    }
}
#content .home-categories-section .home-category-card,
#content .home-categories-section .owl-item > .home-category-card {
    height: 100%;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--store-surface);
    box-shadow: none;
    transform: none;
}
#content .home-categories-section .home-category-card:hover { border-color: var(--store-primary); }
#content .home-categories-section .home-category-card img {
    margin: 0;
    display: block;
    width: 100% !important;
    max-width: none;
    height: auto;
    aspect-ratio: 1;
    padding: 0;
    border: 0 !important;
    border-radius: 8px;
    background: var(--store-canvas);
    object-fit: cover;
    transform: none;
}
#content .home-categories-section .category-name-label {
    white-space: normal;
    text-overflow: clip;
    min-height: 40px;
    padding: 0;
    color: var(--store-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
}
#content .home-categories-section .home-category-card .text-center:last-child { padding-top: 12px; }
#content .home-ad-section { padding: 24px 0; margin: 0; background: var(--store-canvas); }
#content .home-ad-item { border-radius: 12px; box-shadow: none; }
#content .home-ad-item img { border-radius: 12px; height: auto; width: 100%; object-fit: contain; }
/* These rows use native scrolling; their layout never depends on carousel initialization. */
#content .homeproduct .owl-carousel:not(.owl-loaded):is(.category-sliger,.flash_sale_slider,.product_slider) {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 80px) / 5);
    grid-template-columns: none;
    gap: 20px;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--store-border) transparent;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1px;
    padding-bottom: 12px;
}
#content .homeproduct .owl-carousel:not(.owl-loaded) > :is(div, a) { scroll-snap-align: start; }
#content .homeproduct .category-sliger.owl-carousel:not(.owl-loaded) {
    grid-auto-columns: calc((100% - 96px) / 7);
    gap: 16px;
}
#content .homeproduct .owl-stage { display: flex; }
#content .homeproduct .owl-stage .owl-item { display: flex; float: none; }
#content .homeproduct .owl-stage .owl-item > div { width: 100%; }
@media (max-width: 999px) {
    #content .homeproduct .category-product,
    #content .homeproduct .product_sliders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #content .homeproduct .owl-carousel:not(.owl-loaded):is(.flash_sale_slider,.product_slider) {
        grid-auto-columns: calc((100% - 40px) / 3);
    }
    #content .homeproduct .category-sliger.owl-carousel:not(.owl-loaded) {
        grid-auto-columns: calc((100% - 80px) / 6);
    }
    #content :is(.all-products-section, .category-product-section)
    :is(.category-product, .product_sliders) > .product_item:nth-child(n + 7) {
        display: none;
    }
}
@media (max-width: 599px) {
    #content .homeproduct { padding: 22px 0 !important; }
    #content .homeproduct .category-product,
    #content .homeproduct .product_sliders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    #content .homeproduct .product_item { padding: 8px; border-radius: var(--home-radius); }
    #content .homeproduct .pro_name a { font-size: 13px; }
    #content .homeproduct .pro_price p { font-size: 16px; }
    #content .homeproduct .pro_btn { gap: 6px; }
    #content .homeproduct .owl-carousel:not(.owl-loaded):is(.flash_sale_slider,.product_slider) {
        grid-auto-columns: calc((100% - 12px) / 2); gap: 12px;
    }
    #content .homeproduct .category-sliger.owl-carousel:not(.owl-loaded) {
        grid-auto-columns: calc((100% - 24px) / 3); gap: 12px;
    }
    #content .home-categories-section .home-category-card,
    #content .home-categories-section .owl-item > .home-category-card { padding: 8px; }
    #content .home-categories-section .category-name-label { font-size: 11px; }
    #content .homeproduct .section-title-header .section-title-name { font-size: 20px; }
    #content .offer_timer { min-width: 130px; }
    #content :is(.all-products-section, .category-product-section)
    :is(.category-product, .product_sliders) > .product_item:nth-child(n + 5) {
        display: none;
    }
}

/* A restrained brand tint separates browsing sections without tinting product photography. */
#content .home-category-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 28px; }
#content .home-categories-section .home-category-directory .home-category-card {
    display: grid; grid-template-columns: 76px minmax(0, 1fr) 16px; align-items: center; gap: 14px;
    padding: 16px 0; border: 0; border-bottom: 1px solid var(--home-line); border-radius: 0;
    background: transparent; box-shadow: none;
}
#content .home-categories-section .home-category-directory .home-category-card img {
    width: 76px !important; height: 76px; border-radius: var(--home-radius); object-fit: cover;
}
#content .home-categories-section .home-category-directory .category-name-label {
    display: block; min-height: 0; margin: 0; text-align: left; font-size: 14px; line-height: 1.5;
}
#content .home-category-directory .category-link-arrow { color: var(--store-primary); font-size: 13px; transition: transform .18s ease; }
#content .home-categories-section .home-category-directory .home-category-card:hover,
#content .home-categories-section .home-category-directory .home-category-card:focus-visible {
    background: transparent; border-bottom-color: var(--store-primary);
}
#content .home-category-directory .home-category-card:hover .category-name-label { color: var(--store-primary); }
#content .home-category-directory .home-category-card:hover .category-link-arrow { transform: translateX(3px); }
@media (max-width: 1100px) {
    #content .home-category-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; }
}
@media (max-width: 767px) {
    #content .home-category-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
    #content .home-categories-section .home-category-directory .home-category-card { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 14px 0; }
    #content .home-categories-section .home-category-directory .home-category-card img { width: 56px !important; height: 56px; }
    #content .home-categories-section .home-category-directory .category-name-label { font-size: 12px; }
    #content .home-category-directory .category-link-arrow { display: none; }
}
#content .homeproduct.flash-sales-section,
#content .homeproduct.category-product-section:nth-of-type(even),
#content .home-ad-section { background: var(--home-secondary-wash); }
#content .homeproduct .product_item,
#content .home-ad-item,
#content .home-ad-item img,
#content .slider-section .main_slider,
#content .slider-section .slider-item,
#content .slider-section .slider-item img { border-radius: var(--home-radius) !important; }
#content .homeproduct .product_item { border-color: var(--home-line); }
#content .homeproduct :is(.pro_img, .pro_img img, .sale-badge-box, .view_more_btn),
#content .homeproduct .pro_btn :is(button, a),
#content .offer_timer .syotimer-cell { border-radius: var(--home-inset-radius); }
#content .homeproduct .pro_name a:hover { color: var(--store-primary) !important; }
#content .home-categories-section { background: var(--home-secondary-wash); }
#content .home-categories-section .home-category-card,
#content .home-categories-section .owl-item > .home-category-card {
    position: relative; display: block; padding: 14px; border: 1px solid var(--home-line);
    border-radius: var(--home-radius); background: var(--home-primary-wash);
    transition: background-color .18s ease, border-color .18s ease;
}
#content .home-categories-section .home-category-card:nth-child(even) { background: var(--home-secondary-wash); }
#content .home-categories-section .home-category-card:hover,
#content .home-categories-section .home-category-card:focus-within {
    background: color-mix(in srgb, var(--store-primary) 9%, var(--store-surface));
    border-color: var(--store-primary);
}
#content .home-categories-section .home-category-card img { border-radius: var(--home-inset-radius); }
#content .home-categories-section .category-name-label { margin-top: 12px; text-align: center; font-weight: 600; min-height: 44px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 599px) {
    #content .home-categories-section .home-category-card { padding: 10px; }
    #content .home-categories-section .category-name-label { font-size: 12px; line-height: 18px; }
}
