﻿/* ==========================================================================
   Product Detail Layout (Zero Layout Shift Framework)
   ========================================================================== */

.product-detail {
    font-size: 1rem;
    padding-top: 1.6em;
    padding-bottom: 2.4em;
}

.product-detail-wrapper {
    font-size: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 3.6em;
    align-items: start;
    margin-top: 2.4em;
}

/* --------------------------------------------------------------------------
   Cột trái: Media Gallery
   -------------------------------------------------------------------------- */
.product-detail-media {
    font-size: 1rem;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2.4em;
}

.product_detail_slides_wrapper {
    position: relative;
}

.product_detail_slides {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    min-width: 0;
    border-radius: 1.2rem;
    border: 1px solid var(--neutral-8);
    background-color: var(--neutral-1);
    overflow: hidden;
}

.product_detail_slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.product_detail_img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product_slide_next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 2em;
    width: 4.2em;
    height: 4.2em;
    padding: 1em;
    border-radius: 50%;
    background-color: var(--neutral-1);
    color: var(--brand-1);
    z-index: 10;
    box-shadow: 0px 2.8px 8px 0px #6763630D;
    border: 1px solid var(--neutral-2);
    transition: 0.3s;
}

.product_slide_prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 2em;
    width: 4.2em;
    height: 4.2em;
    padding: 1em;
    border-radius: 50%;
    background-color: var(--neutral-1);
    color: var(--brand-1);
    z-index: 10;
    box-shadow: 0px 2.8px 8px 0px #6763630D;
    border: 1px solid var(--neutral-2);
    transition: 0.3s;
}

.product_slide_next:hover,
.product_slide_prev:hover {
    background-color: var(--brand-1);
    color: var(--neutral-1);
    border: none;
}

.product_slide_next>svg {
    transform: rotate(-90deg);
}

.product_slide_prev>svg {
    transform: rotate(90deg);
}

.product_slide_next>svg,
.product_slide_prev>svg {
    width: 100%;
    height: 100%;
    stroke: var(--brand-1);
}

.product_detail_slide_thumbs {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.product_detail_thumb_swiper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.product_detail_slide_thumb {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    max-height: 15em;
    opacity: 0.4;
    transition: opacity 0.3s ease-in-out, border-color 0.3s ease-in-out;
    border-radius: 1em;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
}

.swiper-slide-thumb-active>.product_detail_slide_thumb {
    opacity: 1;
    border-color: var(--brand-3);
}

.product_detail_thumb_img {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Cột phải: Product Info & Specs
   -------------------------------------------------------------------------- */
.product-detail-info {
    position: relative;
    font-size: 1rem;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.6em;
}

/* Header Tags & Wishlist */
.product_info_header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 90%;
    gap: 0.5em;
}

.product_cates_tags {
    display: flex;
    align-items: center;
    gap: 0.6em;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.4em;
    font-weight: 500;
    color: var(--brand-2);
}

.product_cates_tags a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.product_cates_tags a:hover {
    color: var(--brand-1);
}

.product_cates_dot {
    color: var(--neutral-11);
    font-size: 0.8em;
}

.product_wishlist_wrap {
    position: absolute;
    top: 0;
    right: 0;
}

.product_wishlist_wrap .like-label {
    width: 3.6rem;
    height: 3.6rem;
}

.product_wishlist_wrap .like-label svg {
    width: 2.6rem;
    height: 2.6rem;
}

.product_wishlist_btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.8em;
    height: 2.8em;
    border: none;
    background-color: transparent;
    color: var(--brand-1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.product_wishlist_btn>svg {
    width: 100%;
    height: 100%;
}

.product_wishlist_btn:hover,
.product_wishlist_btn.active {
    color: var(--brand-3);
    transform: scale(1.05);
}

/* Title */
.product_detail_title {
    font-size: 3.2em;
    font-weight: 500;
    color: var(--secondary-8);
    margin: 0;
}

/* Meta Grid */
.product_detail_meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6em;
    padding: 1.6em 0;
    border-top: 1px dashed var(--neutral-7);
    border-bottom: 1px dashed var(--neutral-7);
}

.product_detail_meta_item {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.product_detail_meta_label {
    font-size: 1.4em;
    color: var(--neutral-4);
    font-weight: 500;
}

.product_detail_meta_val {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--neutral-6);
}

/* Pricing Section */
.product_detail_pricing {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.product_pricing_account {
    font-size: 1.6em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--secondary-8);
}

.product_price_display {
    display: flex;
    align-items: baseline;
    gap: 1em;
}

.product_price_amount {
    font-size: 3em;
    font-weight: 600;
    color: var(--brand-3);
}

.product_price_unit {
    font-size: 2em;
    font-weight: 400;
    color: var(--neutral-11);
}

/* Notice Bar */
.product_transport_notice {
    display: flex;
    align-items: center;
    gap: 0.8em;
    padding: 0.8em 1.4em;
    border-radius: 2em;
    background-color: var(--secondary-6);
    border: 1px solid rgba(139, 197, 61, 0.25);
    width: fit-content;
    max-width: 100%;
    margin-top: 0.4em;
}

.product_transport_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    color: var(--brand-2);
    flex-shrink: 0;
}

.product_transport_icon>svg {
    width: 100%;
    height: 100%;
}

.product_transport_text {
    font-size: 1.3em;
    color: var(--neutral-6);
    margin: 0;
    font-weight: 400;
}

/* Purchase (Quantity & Buttons) */
.product_detail_purchase {
    display: flex;
    flex-direction: column;
    gap: 1.6em;
}

.product_purchase_row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.6em;
    width: 100%;
}

.product_qty_block,
.product_order_block {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    min-width: 0;
}

.product_qty_label,
.product_order_label {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--secondary-8);
}

.product_qty_stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--neutral-7);
    border-radius: 0.8em;
    overflow: hidden;
    height: 3.8em;
    background: var(--neutral-1);
    width: 100%;
    transition: border-color 0.2s ease;
}

.product_qty_stepper:focus-within {
    border-color: var(--brand-1);
}

.product_qty_btn {
    font-size: 1rem;
    width: 3.8em;
    height: 100%;
    box-sizing: border-box;
    border: none;
    background: transparent;
    font-weight: 400;
    color: var(--neutral-4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}

.product_qty_btn>span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    line-height: 1;
    pointer-events: none;
}

.product_qty_minus {
    border-right: 1px solid var(--neutral-7);
}

.product_qty_plus {
    border-left: 1px solid var(--neutral-7);
}

.product_qty_btn:hover {
    background-color: var(--neutral-2);
    color: var(--brand-1);
}

.product_qty_val {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 1.5em;
    font-weight: 500;
    color: var(--neutral-6);
    outline: none;
    background: transparent;
    font-family: inherit;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Order by Dropdown */
.product_order_select_wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 3.8em;
    border: 1px solid var(--neutral-7);
    border-radius: 0.8em;
    background: var(--neutral-1);
    overflow: hidden;
    width: 100%;
    transition: border-color 0.2s ease;
}

.product_order_select_wrapper:focus-within {
    border-color: var(--brand-1);
}

.product_order_select {
    font-size: 1.2em;
    width: 100%;
    height: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 3.6em 0 1.6em;
    font-weight: 400;
    color: var(--neutral-6);
    cursor: pointer;
    font-family: inherit;
}

.product_order_arrow {
    position: absolute;
    right: 1.4em;
    top: 50%;
    transform: translateY(-50%);
    width: 1.6em;
    height: 1.6em;
    color: var(--neutral-4);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product_cta_actions {
    display: flex;
    align-items: center;
    gap: 1.6em;
    width: 100%;
}

.product_btn_cart {
    font-size: 1rem;
    flex: 1;
    height: 4.4em;
    border-radius: 0.8em;
    background-color: var(--brand-1);
    color: var(--neutral-1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product_btn_cart:hover {
    background-color: var(--secondary-8);
}

.product_btn_cart--disabled,
.product_btn_cart:disabled {
    background-color: var(--neutral-7);
    color: var(--neutral-5);
    cursor: not-allowed;
}

.product_btn_cart--disabled:hover,
.product_btn_cart:disabled:hover {
    background-color: var(--neutral-7);
}

.product_btn_cart>svg {
    width: 1.8em;
    height: 1.8em;
}

.product_btn_cart>span {
    font-size: 1.5em;
}

.product_btn_buy {
    font-size: 1rem;
    flex: 1;
    height: 4.4em;
    border-radius: 0.8em;
    background-color: var(--brand-3);
    color: var(--neutral-1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product_btn_buy:hover {
    background-color: var(--secondary-2);
}

.product_btn_buy>svg {
    width: 1.8em;
    height: 1.8em;
}

.product_btn_buy>span {
    font-size: 1.5em;
}

/* Pricing Section (No Login State) */
.product_detail_pricing_no {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.6em 1.2em;
    border-radius: 1em;
    background-color: var(--secondary-9);
}

.product_no_login_title {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--neutral-6);
}

.product_no_login_desc {
    font-size: 1.3em;
    color: var(--neutral-12);
    margin-top: 0.8em;
    margin-bottom: 0.8em;
    font-weight: 400;
}

.product_no_login_actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2em;
    width: 100%;
}

.product_no_login_btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 1.2em 2em;
    border-radius: 0.8em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product_no_login_btn>span {
    font-size: 1.5em;
}

.product_no_login_btn_primary {
    background-color: var(--secondary-7);
    color: var(--neutral-1);
}

.product_no_login_btn_primary:hover {
    background-color: var(--brand-3);
    color: var(--neutral-1);
}

.product_no_login_btn_outline {
    background-color: var(--neutral-1);
    color: var(--secondary-4);
    border: 1px solid var(--secondary-4);
}

.product_no_login_btn_outline:hover {
    background-color: var(--secondary-4);
    color: var(--neutral-1);
}

/* Accordion Specifications */
.product_detail_specs {
    display: flex;
    flex-direction: column;
    border-top: 1px dashed var(--neutral-7);
}

.product_spec_accordion {
    border-bottom: 1px dashed var(--neutral-7);
    padding: 1.4em 0;
    transition: all 0.3s ease;
}

.product_spec_accordion:last-child {
    border-bottom: none;
}

.product_spec_summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.product_spec_summary::-webkit-details-marker {
    display: none;
}

.product_spec_heading {
    font-size: 1.6em;
    font-weight: 500;
    color: var(--secondary-4);
}

.product_spec_chevron {
    width: 1.6em;
    height: 1.6em;
    color: var(--brand-1);
    transition: transform 0.3s ease;
}

.product_spec_accordion[open]>.product_spec_summary>.product_spec_chevron {
    transform: rotate(180deg);
}

.product_spec_body {
    display: flex;
    flex-direction: column;
    margin-top: 1.2em;
}

.product_spec_entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8em 0;
    border-bottom: 1px solid var(--neutral-2);
}

.product_spec_entry:last-child {
    border-bottom: none;
}

.product_spec_field {
    font-size: 1.4em;
    color: var(--neutral-4);
    font-weight: 400;
}

.product_spec_data {
    font-size: 1.4em;
    color: var(--neutral-6);
    font-weight: 500;
    text-align: right;
}

.products_also_like {
    font-size: 1rem;
    padding: 3.6em 0;
    background-color: var(--neutral-14);
}

.also_like_title {
    font-size: 3.2rem;
    font-weight: 500;
    color: var(--brand-1);
    margin-bottom: 0.5em;
}

.also_like_list {
    position: relative;
}

.product-detail-discount {
    font-size: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.6em;
    align-items: center;
    justify-content: center;
}

.product-detail-discount-img {
    width: 100%;
}

.product_detail_badgets {
    font-size: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: flex-start;
    justify-content: center;
}

.product_detail_badget {
    padding: 0.6em;
    border-radius: 0.6em;
    background-color: var(--secondary-9);
    color: var(--secondary-5);
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.product_detail_badget>span {
    font-size: 1.3em;
    font-weight: 400;
}

.product_detail_badget>svg{
    width: 1.5em;
    height: 1.5em;
}

/* --------------------------------------------------------------------------
   Responsive Layout
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
    .product_slide_next,
    .product_slide_prev {
        width: 3.2em;
        height: 3.2em;
        padding: 0.8em;
    }

    .product_btn_cart>span {
        font-size: 1.3em;
    }

    .product_btn_buy>span {
        font-size: 1.3em;
    }

    .product_detail_meta {
        grid-template-columns: repeat(3, auto);
    }

    .product_detail_meta_label,
    .product_spec_field,
    .product_spec_data,
    .product_detail_meta_val {
        font-size: 1.2em;
    }

    .product_pricing_account,
    .product_spec_heading {
        font-size: 1.4em;
    }

    .products_also_like {
        padding: 2.4em 1em 3.6em 1em;
    }

    .also_like_title {
        font-size: 2.2em;
    }

    .also-like-prev {
        left: -1em !important;
        padding: 0.8em;
    }

    .also-like-next {
        right: -1em !important;
        padding: 0.8em;
    }

    .product_detail_pricing_no {
        padding: 2em 1.4em;
    }

    .product_no_login_title {
        font-size: 1.4em;
    }

    .product_no_login_desc {
        font-size: 1.2em;
        margin-bottom: 1.2em;
    }

    .product_no_login_btn {
        padding: 0.8em 1.6em;
    }

    .product_no_login_btn>span {
        font-size: 1.2em;
    }

}


@media (min-width: 768px) and (max-width: 991px) {
    .product-detail-wrapper {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 2.8em;
    }

    .product_detail_title {
        font-size: 2.4em;
    }

    .product_cta_actions {
        min-width: 100%;
    }
}

@media (max-width: 767px) {
    .product-detail {
        padding-top: 0.8em;
        padding-bottom: 3em;
    }

    .product-detail-wrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.4em;
        margin-top: 1.6em;
    }

    .product_detail_title {
        font-size: 2em;
    }

    .product_detail_meta {
        gap: 1em;
    }

    .product_detail_meta_val {
        font-size: 1.3em;
    }

    .product_price_amount {
        font-size: 2.8em;
    }

    .product_detail_purchase {
        flex-direction: column;
        align-items: stretch;
    }

    .product_purchase_row {
        gap: 1.2em;
    }
}