/* Single Product Page Styles */

#single-product {
    padding-top: 40px;
    padding-bottom: 30px;
}

@media (max-width: 768px) {
    #single-product {
        padding-top: 24px;
    }
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.product-gallery .owl-carousel img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

/* Product Info Section */
.product-info {
    display: flex;
    flex-direction: column;
}

/* Breadcrumb Styles */
ul.breadcrumb,
.product-info .breadcrumb {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0 !important;
    margin-bottom: 16px !important;
    font-size: 12px !important;
    list-style: none !important;
    padding: 0 !important;
}

ul.breadcrumb li,
.product-info .breadcrumb li {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
}

ul.breadcrumb li:not(:first-child)::before,
.product-info .breadcrumb li:not(:first-child)::before {
    content: '' !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    margin-right: 8px !important;
    margin-left: 8px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M4.5 9.5L7.5 6L4.5 2.5' stroke='%23BDBDBD' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    flex-shrink: 0 !important;
}

ul.breadcrumb a,
.product-info .breadcrumb a {
    color: #BDBDBD !important;
    text-decoration: none !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

ul.breadcrumb a:hover,
.product-info .breadcrumb a:hover {
    color: #939598 !important;
}

ul.breadcrumb span,
.product-info .breadcrumb span {
    color: #BDBDBD !important;
}

.product-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    color: #213868;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-height .owl-theme,
.custom-height .owl-theme img {
    max-height: 596px;
}

.product-sku {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 0;
    border-bottom: none;
}

.product-sku-label {
    font-size: 16px;
    color: #757575;
    font-weight: 400;
}

.product-sku-value {
    font-size: 16px;
    font-weight: 600;
    color: #424242;
}

/* Product Attributes */
.product-attributes {
    margin-bottom: 24px;
}

.product-attribute {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.product-attribute-label {
    font-size: 16px;
    color: #757575;
    min-width: 140px;
    font-weight: 400;
}

.product-attribute-values {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Hidden attribute - for conditional display */
.product-attribute.hidden-attribute {
    display: none !important;
}

/* Dropdown Style */
.product-attribute-dropdown {
    flex: 0 0 auto;
    width: fit-content;
}

.attribute-select {
    width: fit-content;
    min-width: 180px;
    max-width: none;
    padding: 12px 40px 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    background: white;
    color: #9E9E9E;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%239E9E9E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.attribute-select:hover,
.attribute-select:focus {
    border-color: #BDBDBD;
    outline: none;
}

.attribute-select option {
    padding: 10px;
}

/* Color Swatches */
.color-swatches {
    gap: 12px;
}

.color-swatch {
    width: 16px;
    height: 16px;
    padding: 0;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    box-shadow: 0 0 0 1px #E0E0E0;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    box-shadow: 0 0 0 1px white, 0 0 0 3px #213868;
}

.color-swatch.active::after {
    display: none;
}

/* Regular attribute buttons */
.attribute-option {
    padding: 8px 16px;
    border: 2px solid #213868;
    border-radius: 5px;
    background: white;
    color: #213868;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attribute-option:hover,
.attribute-option.active {
    background: #213868;
    color: white;
}

/* Simple product attribute values */
.attribute-value {
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 5px;
    color: #213868;
    font-size: 14px;
    font-weight: 500;
}

/* Quantity Control */
.product-quantity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-quantity-label {
    font-size: 16px;
    color: #757575;
    min-width: 140px;
    font-weight: 400;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
    max-width: 120px;
}

.quantity-control button {
    width: 50px;
    height: 48px;
    background: white;
    border: none;
    color: #BDBDBD;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-control button:hover {
    background: #F5F5F5;
    color: #757575;
}

.quantity-control input {
    width: 80px;
    height: 48px;
    border: none;
    border-left: 1px solid #E0E0E0;
    border-right: 1px solid #E0E0E0;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    color: #424242;
}

/* Price */
.product-price {
    font-size: 40px;
    font-weight: 700;
    color: #213868;
    margin-bottom: 32px;
    margin-top: 32px;
}

/* Product Buttons */
.product-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.product-buttons button {
    flex: 1;
    padding: 15px 24px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #213868;
}

.btn-buy-now {
    background: #213868;
    color: white;
}

.btn-buy-now:hover {
    background: white;
    color: #213868;
}

.btn-add-to-cart {
    background: white;
    color: #213868;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-to-cart:hover {
    background: #213868;
    color: white;
}

.btn-add-to-cart svg path {
    transition: stroke 0.3s ease;
}

.btn-add-to-cart:hover svg path {
    stroke: white;
}


/* Related Products Section - Style giống Best Seller */
.related-product-section {
    padding: 80px 0;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.related-product-section__divider {
    height: 2px;
    background: #939598;
    margin-bottom: 50px;
}

/* Main Wrapper - Vertical Layout */
.related-product-section__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Left Side - Title (Trên cùng) */
.related-product-section__left {
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
}

.related-product-section__title {
    font-size: 48px;
    font-weight: 700;
    color: #213868;
    margin-bottom: 0;
    line-height: 1.2;
    letter-spacing: 0.02em;
    font-family: Montserrat ExtraBold, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    text-transform: uppercase;
    white-space: nowrap;
}

.related-product-section__subtitle {
    font-size: 16px;
    color: #213868;
    margin-top: 12px;
    line-height: 1.6;
}

/* Right Side - Carousel Container (Dưới title) */
.related-product-section__right {
    width: 100%;
}

/* Carousel */
.related-product-section__carousel {
    margin-bottom: 20px;
}

/* Product Card */
.related-product-section__card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.related-product-section__card:hover {
    transform: translateY(-8px);
}

.related-product-section__wrapper .product {
    max-width: 304px;
    padding-top: 10px;
}

/* Pagination Progress Bar */
.related-product-section__pagination {
    margin-top: 30px;
}

.related-product-section .swiper-pagination {
    position: relative;
    bottom: 0;
}

.related-product-section .swiper-pagination-progressbar {
    background: rgba(0, 0, 0, 0.1);
    height: 4px;
    border-radius: 2px;
}

.related-product-section .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
    background: #213868;
    border-radius: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-title {
        font-size: 24px;
    }

    .product-sku {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .product-attribute {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .product-attribute-label {
        min-width: auto;
        width: 100%;
    }

    .product-attribute-dropdown {
        width: 100%;
    }

    .attribute-select {
        max-width: 100%;
    }

    .product-attribute-values {
        width: 100%;
    }

    .product-quantity {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .product-quantity-label {
        min-width: auto;
    }

    .product-price {
        font-size: 24px;
    }

    .product-buttons {
        flex-direction: column;
    }

    .btn-add-to-cart span {
        display: inline;
    }


    #related-product h2 {
        font-size: 20px;
    }
}

/* Mobile Accordion Style - Override WooCommerce */
@media (max-width: 768px) {
    .product-tabs-mobile details {
        margin-bottom: 16px !important;
        border: 2px solid #213868 !important;
        border-radius: 5px !important;
    }

    .product-tabs-mobile summary {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 16px !important;
        background: #213868 !important;
        color: white !important;
        font-family: 'Montserrat', sans-serif !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        list-style: none !important;
    }

    .product-tabs-mobile summary::-webkit-details-marker {
        display: none !important;
    }

    .product-tabs-mobile summary svg {
        transition: transform 0.3s ease !important;
    }

    .product-tabs-mobile details[open] summary svg {
        transform: rotate(180deg) !important;
    }

    .product-tabs-mobile .tab-content {
        padding: 16px !important;
        color: #213868 !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
        background: white !important;
    }

    /* Override WooCommerce styles in mobile tabs */
    .product-tabs-mobile .tab-content p,
    .product-tabs-mobile .tab-content ul,
    .product-tabs-mobile .tab-content ol,
    .product-tabs-mobile .tab-content h1,
    .product-tabs-mobile .tab-content h2,
    .product-tabs-mobile .tab-content h3,
    .product-tabs-mobile .tab-content h4,
    .product-tabs-mobile .tab-content h5,
    .product-tabs-mobile .tab-content h6 {
        color: #213868 !important;
        font-family: 'Montserrat', sans-serif !important;
    }

    .product-tabs-mobile .tab-content table {
        width: 100% !important;
        border-collapse: collapse !important;
        background: transparent !important;
    }

    .product-tabs-mobile .tab-content table td {
        padding: 12px !important;
        border: 1px solid #E5E5E5 !important;
        background: transparent !important;
        color: #213868 !important;
        font-size: 14px !important;
    }

    .product-tabs-mobile .tab-content table td:first-child {
        font-weight: 600 !important;
    }
}

/* Additional Styles for Better Layout */

/* Back to Category Link */
.back-to-category {
    display: inline-flex;
    align-items: center;
    color: #213868;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 24px;
    transition: opacity 0.3s ease;
}

.back-to-category:hover {
    opacity: 0.7;
}

.back-to-category svg {
    margin-right: 8px;
}

/* Product Gallery Improvements */
.product-gallery .owl-carousel .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9) !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-gallery .owl-carousel .owl-nav button:hover {
    background: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-gallery .owl-carousel .owl-nav button.owl-prev {
    left: 10px;
}

.product-gallery .owl-carousel .owl-nav button.owl-next {
    right: 10px;
}

.product-gallery .owl-carousel .owl-dots {
    margin-top: 16px;
    text-align: center;
}

.product-gallery .owl-carousel .owl-dot {
    width: 12px;
    height: 12px;
    background: #E5E5E5;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.product-gallery .owl-carousel .owl-dot.active {
    background: #213868;
    width: 32px;
    border-radius: 6px;
}



/* Add hover effect to related products */
#related-product .product {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#related-product .product:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



/* Loading state for buttons */
.btn-buy-now.loading,
.btn-add-to-cart.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.btn-buy-now.loading::after,
.btn-add-to-cart.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Improve mobile spacing */
@media (max-width: 768px) {
    #single-product {
        padding-bottom: 20px;
    }

    .product-gallery {
        margin-bottom: 24px;
    }

    .product-info {
        padding: 0 16px;
    }

    .back-to-category {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .product-tabs-mobile {
        padding: 0 16px;
    }

    .related-product-section {
        padding: 40px 0;
    }

    .related-product-section__left {
        margin-bottom: 30px;
        text-align: center;
    }

    .related-product-section__title {
        font-size: 28px;
    }

    .related-product-section__subtitle {
        font-size: 14px;
    }

    .related-product-section__wrapper .product {
        width: 100%;
        max-width: 100%;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-title {
        font-size: 32px;
    }



    .related-product-section {
        padding: 60px 0;
    }

    .related-product-section__left {
        margin-bottom: 40px;
        text-align: center;
    }

    .related-product-section__title {
        font-size: 36px;
    }

    .related-product-section__subtitle {
        font-size: 15px;
    }
}

/* Large screen improvements */
@media (min-width: 1440px) {
    .product-gallery img {
        max-height: 600px;
        object-fit: contain;
    }

    .related-product-section__wrapper .product {
        max-width: 100%;
    }
}

@media (max-width: 1440px) {
    .related-product-section__wrapper .product {
        max-width: 100%;
        padding-top: 10px;
    }
}