
    .custom-size .custom-control-label {
        padding: 0.2rem !important;
        border: none !important;
    }
    .woo_product_thumb {
        max-height: 200px !important;
        overflow: hidden;
    }
    .product-box-image {
        max-height: 250px !important;
    }

    /* Product card styles from home.blade.php */
    .woo_product_thumb {
        width: 100% !important;
        aspect-ratio: 1 / 1;
        position: relative;
        overflow: hidden;
        padding: 0 !important;
        margin: 0 !important;
    }
    .woo_product_thumb img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        margin: 0 !important;
        padding: 0 !important;
    }
    .product-box-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        margin: 0 !important;
        padding: 0 !important;
    }

    .product-home {
        width: 100%;
    }
    /* Non-mobile: thu hẹp gutter của cột Bootstrap (mặc định 15px) xuống 5px mỗi bên;
       !important để chắc chắn ghi đè .col-* của bootstrap.min.css */
    @media (min-width: 768px) {
        .product-home {
            padding-left: 5px !important;
            padding-right: 5px !important;
        }
    }
    .product-home a {
        display: block;
        width: 100%;
        padding: 0 !important;
    }
    .product-home .woo_product_grid {
        width: 100%;
        padding: 0 !important;
    }
    .product-home .woo_product_thumb {
        width: 100% !important;
        max-width: 100%;
        align-self: stretch;
    }
    .product-home .product-box-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .woo_product_grid {
        display: flex;
        flex-direction: column;
        height: 100%;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
        transition: box-shadow 0.3s ease;
        padding: 0 !important;
    }

    .woo_product_grid:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .woo_product_caption {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .row[style*="display: flex"] {
        display: flex !important;
        flex-wrap: wrap;
    }

    .row[style*="display: flex"] > div {
        display: flex !important;
    }

    .row[style*="display: flex"] .woo_product_grid {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    @media (max-width: 576px) {
        .row[style*="display: flex"] > .col-6 {
            flex: 0 0 50%;
            max-width: 50%;
        }
    }

    @media (min-width: 577px) and (max-width: 768px) {
        .row[style*="display: flex"] > .col-sm-6 {
            flex: 0 0 50%;
            max-width: 50%;
        }
    }

    @media (min-width: 769px) {
        .row[style*="display: flex"] > .col-lg-4 {
            flex: 0 0 33.333333%;
            max-width: 33.333333%;
        }
    }

    @media (min-width: 1200px) {
        .row[style*="display: flex"] > .col-xl-3 {
            flex: 0 0 25%;
            max-width: 25%;
        }
    }

    .product-name-home {
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        color: #333 !important;
        margin-bottom: 6px !important;
        min-height: 45px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center !important;
    }

    .product-vendor-sku {
        font-size: 12px;
        color: #666;
        margin-bottom: 8px;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
    }

    .product-package {
        font-size: 12px;
        color: #0ABC76;
        margin-bottom: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .product-variations {
        display: flex;
        gap: 4px;
        margin-bottom: 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: center;
    }

    .product-variations::-webkit-scrollbar {
        display: none;
    }

    .product-variations span {
        font-size: 10px;
        padding: 2px 5px;
        background-color: #f5f5f5;
        border-radius: 3px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .product-price-home {
        font-size: 16px;
        font-weight: 700;
        color: #333;
        margin-bottom: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .woo_btn_action {
        padding: 0 12px 12px;
        margin-top: auto;
    }

    .woo_btn_action .btn {
        width: 100%;
        padding: 4px 10px;
        font-size: 11px;
        height: auto !important; /* Override head.blade.php */
        line-height: 1.4;
        min-height: 32px;
    }

    /* Override CSS from head.blade.php for Related Products buttons */
    section.gray .woo_product_grid .woo_btn_action .btn.cart,
    section.gray .woo_product_grid .woo_btn_action .cart {
        font-size: 12px !important; /* Match home.blade.php */
        height: auto !important; /* Override head.blade.php */
        padding: 5px 12px !important; /* Match product-card.blade.php inline style */
        min-height: auto !important;
        line-height: 1.4 !important;
    }

    @media (max-width: 576px) {
        .row[style*="display: flex"] {
            display: flex !important;
            flex-wrap: wrap;
        }

        .row[style*="display: flex"] > div {
            display: flex !important;
            width: 100%;
        }

        .product-name-home {
            font-size: 13px !important;
            min-height: 32px;
            margin-bottom: 4px !important;
            line-height: 1.25 !important;
        }

        .product-vendor-sku {
            font-size: 10px;
            margin-bottom: 4px;
            line-height: 1.3;
        }

        .product-package {
            font-size: 11px;
            margin-bottom: 4px;
        }

        .product-price-home {
            font-size: 14px;
            margin-bottom: 0;
        }

        .product-variations span {
            font-size: 9px;
            padding: 2px 4px;
        }

        .product-variations {
            gap: 3px;
            margin-bottom: 6px;
        }

        .woo_btn_action {
            padding: 0 8px 8px;
            margin-top: 6px;
        }

        .woo_btn_action .btn {
            font-size: 10px;
            padding: 3px 8px;
            min-height: 26px;
        }

        /* Override for Related Products on mobile */
        section.gray .woo_product_grid .woo_btn_action .btn.cart,
        section.gray .woo_product_grid .woo_btn_action .cart {
            font-size: 10px !important;
            height: auto !important;
            padding: 3px 8px !important;
            min-height: 26px !important;
        }

        .woo_product_thumb {
            width: 100%;
            aspect-ratio: 1 / 1;
            height: auto;
            justify-content: center;
            align-items: center;
        }

        .woo_product_caption {
            padding: 6px 8px 8px !important;
        }
    }

    @media (min-width: 577px) and (max-width: 768px) {
        .row[style*="display: flex"] {
            display: flex !important;
            flex-wrap: wrap;
        }

        .row[style*="display: flex"] > div {
            display: flex !important;
        }

        .product-name-home {
            font-size: 13px !important;
        }

        .woo_product_thumb {
            width: 100%;
            aspect-ratio: 1 / 1;
            height: auto;
        }

        .woo_btn_action .btn {
            font-size: 11px;
            padding: 4px 10px;
            min-height: 30px;
        }

        /* Override for Related Products on tablet */
        section.gray .woo_product_grid .woo_btn_action .btn.cart,
        section.gray .woo_product_grid .woo_btn_action .cart {
            font-size: 11px !important;
            height: auto !important;
            padding: 4px 10px !important;
            min-height: 30px !important;
        }
    }

    /* ========================================
       PRODUCT DETAIL SECTION STYLES
       ======================================== */
    
    /* Product Detail Container */
    .woo_pr_detail {
        padding: 0 20px;
        max-width: 600px;
    }

    /* Product Title */
    .woo_pr_title {
        font-size: 28px;
        font-weight: 700;
        color: #1a3760;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    /* Vendor & SKU Badge */
    .vendor-sku-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 14px;
        background: #f8f9fa;
        border-radius: 6px;
        font-size: 14px;
        margin-bottom: 12px;
    }
    .vendor-sku-badge .vendor-name {
        color: #333;
        font-weight: 600;
    }
    .vendor-sku-badge .sku {
        color: #e74c3c;
        font-weight: 700;
    }

    /* Reviews Section */
    .woo_pr_reviews {
        margin-bottom: 12px;
    }

    /* Price Section - Card Style */
    .price-section {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border: 2px solid #1a3760;
        border-radius: 8px;
        padding: 16px;
        margin: 12px 0;
    }

    .price-main {
        font-size: 32px;
        font-weight: 700;
        color: #1a3760;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .tax-badge {
        display: inline-block;
        padding: 4px 10px;
        background: #fee;
        border: 1px solid #e74c3c;
        border-radius: 4px;
        color: #e74c3c;
        font-size: 12px;
        font-weight: 600;
        margin-top: 4px;
    }

    .tax-badge.text-success {
        background: #e8f5e9;
        border-color: #0ABC76;
        color: #0ABC76;
    }

    /* Section Divider */
    .section-divider {
        height: 1px;
        background: #e5e5e5;
        margin: 16px 0;
        border: none;
    }

    /* Variations Section */
    .variations-section {
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        padding: 12px;
        margin: 10px 0;
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: flex-start;
    }

    .variation-group {
        flex: 1;
        min-width: 150px;
        margin-bottom: 0;
    }

    .variation-label {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
        display: block;
    }

    /* Variation Options - Button Style */
    .variation-options {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .variation-option {
        position: relative;
    }

    .variation-option input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .variation-option label {
        display: inline-block;
        padding: 8px 16px;
        border: 2px solid #ddd;
        border-radius: 6px;
        background: #fff;
        color: #333;
        font-size: 13px;
        cursor: pointer;
        transition: all 0.3s;
        min-width: 70px;
        text-align: center;
        font-weight: 500;
    }

    .variation-option input[type="radio"]:checked + label {
        border-color: #1a3760;
        background: #1a3760;
        color: #fff;
        font-weight: 600;
    }

    /* Product Info Grid */
    .product-info-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 12px 0;
    }

    .info-card {
        background: #f8f9fa;
        border: 1px solid #e5e5e5;
        border-radius: 6px;
        padding: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s;
    }

    .info-card:hover {
        border-color: #1a3760;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .info-card-icon {
        font-size: 18px;
        color: #1a3760;
        flex-shrink: 0;
    }

    .info-card-content {
        flex: 1;
    }

    .info-card-label {
        font-size: 11px;
        color: #666;
        margin-bottom: 3px;
    }

    .info-card-value {
        font-size: 13px;
        font-weight: 600;
        color: #333;
    }

    .info-card-value.in-stock {
        color: #0ABC76;
    }

    /* Add to Cart Section */
    .add-to-cart-section {
        margin-top: 20px;
        padding-top: 16px;
        border-top: 2px solid #e5e5e5;
    }

    /* Product Detail Add to Cart Button - Specific styling */
    .product-details-page .product-detail-add-cart-btn,
    .product-details-page .product-detail-add-cart-btn.btn,
    .product-details-page .product-detail-add-cart-btn.btn-dark,
    .product-details-page .product-detail-add-cart-btn.cart {
        width: 100%;
        padding: 15px 12px !important;
        background: #1a3760;
        color: #fff;
        border: none;
        border-radius: 4px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: auto;
        line-height: 1.4;
    }

    .product-details-page .product-detail-add-cart-btn:hover,
    .product-details-page .product-detail-add-cart-btn.btn:hover,
    .product-details-page .product-detail-add-cart-btn.btn-dark:hover {
        background: #0d47a1;
    }

    /* ========================================
       PRODUCT IMAGE GALLERY STYLES
       ======================================== */
    
    .product-image-gallery {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Main Image Container - Match height with product detail */
    .product-main-image {
        width: 100%;
        flex: 1;
        min-height: 500px;
        position: relative;
        overflow: hidden;
        border-radius: 8px;
        background: #f8f9fa;
        margin-bottom: 12px;
        cursor: zoom-in;
        transition: transform 0.3s;
    }

    @media (min-width: 992px) {
        .product-main-image {
            min-height: 600px;
        }
    }

    .product-main-image:hover {
        transform: scale(1.01);
    }

    .product-main-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        transition: transform 0.3s;
    }

    .product-main-image:hover img {
        transform: scale(1.03);
    }

    /* Thumbnails Container */
    .product-thumbnails {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .product-thumbnail {
        flex: 0 0 calc(25% - 6px);
        aspect-ratio: 4 / 3;
        position: relative;
        overflow: hidden;
        border-radius: 6px;
        border: 2px solid transparent;
        background: #f8f9fa;
        cursor: pointer;
        transition: all 0.3s;
    }

    .product-thumbnail:hover {
        border-color: #1a3760;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .product-thumbnail.active {
        border-color: #1a3760;
        box-shadow: 0 0 0 2px rgba(26, 55, 96, 0.2);
    }

    .product-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    /* Lightbox/Modal for Image Zoom */
    .image-lightbox {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 9999;
        cursor: zoom-out;
    }

    .image-lightbox.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-lightbox img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
    }

    .image-lightbox-close {
        position: absolute;
        top: 20px;
        right: 30px;
        color: #fff;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
        z-index: 10000;
        transition: transform 0.3s;
    }

    .image-lightbox-close:hover {
        transform: rotate(90deg);
    }

    /* Responsive for Product Detail */
    
    /* Tablet (577px - 768px) */
    @media (min-width: 577px) and (max-width: 768px) {
        .woo_pr_detail {
            padding: 0 15px;
        }

        .woo_pr_title {
            font-size: 26px;
            margin-bottom: 10px;
        }

        .vendor-sku-badge {
            padding: 6px 12px;
            font-size: 13px;
            margin-bottom: 10px;
        }

        .price-section {
            padding: 14px;
            margin: 10px 0;
        }

        .price-main {
            font-size: 30px;
        }

        .variations-section {
            padding: 12px;
            gap: 12px;
        }

        .variation-group {
            min-width: 140px;
        }

        .variation-label {
            font-size: 12px;
            margin-bottom: 6px;
        }

        .variation-option label {
            padding: 7px 14px;
            font-size: 12px;
            min-width: 60px;
        }

        .product-info-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }

        .info-card {
            padding: 10px;
        }

        .info-card-icon {
            font-size: 16px;
        }

        .info-card-label {
            font-size: 10px;
        }

        .info-card-value {
            font-size: 12px;
        }

        .add-to-cart-section {
            margin-top: 16px;
            padding-top: 14px;
        }

        .product-details-page .product-detail-add-cart-btn {
            padding: 5px 12px;
            font-size: 12px;
        }

        .section-divider {
            margin: 14px 0;
        }
    }

    /* Mobile (max-width: 576px) */
    @media (max-width: 576px) {
        .woo_pr_detail {
            padding: 0 10px;
        }

        .woo_pr_title {
            font-size: 22px;
            margin-bottom: 8px;
            line-height: 1.2;
        }

        .vendor-sku-badge {
            padding: 5px 10px;
            font-size: 12px;
            margin-bottom: 8px;
            gap: 6px;
        }

        .woo_pr_reviews {
            margin-bottom: 8px;
        }

        .price-section {
            padding: 12px;
            margin: 8px 0;
        }

        .price-main {
            font-size: 26px;
            margin-bottom: 4px;
        }

        .tax-badge {
            padding: 3px 8px;
            font-size: 11px;
            margin-top: 4px;
        }

        .section-divider {
            margin: 12px 0;
        }

        /* Variations Section - groups side by side on one row on mobile */
        .variations-section {
            padding: 12px;
            gap: 12px;
            margin: 8px 0;
        }

        .variation-group {
            flex: 1 1 0;
            min-width: 0;
            margin-bottom: 0;
        }

        .variation-label {
            font-size: 12px;
            margin-bottom: 6px;
        }

        .variation-options {
            gap: 6px;
        }

        .variation-option label {
            padding: 8px 12px;
            font-size: 12px;
            min-width: 60px;
        }

        /* Product Info Grid - 2 cards per row on mobile; the 5th (tags) card
           spans its own full row via its inline grid-column: 1 / -1 */
        .product-info-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            margin: 8px 0;
        }

        .info-card {
            padding: 10px;
            gap: 8px;
        }

        .info-card-icon {
            font-size: 16px;
        }

        .info-card-label {
            font-size: 10px;
            margin-bottom: 2px;
        }

        .info-card-value {
            font-size: 12px;
        }

        /* Add to Cart Section */
        .add-to-cart-section {
            margin-top: 16px;
            padding-top: 12px;
        }

        .product-details-page .product-detail-add-cart-btn {
            padding: 10px 12px;
            font-size: 12px;
            gap: 4px;
        }

        /* Image Gallery Mobile */
        .product-main-image {
            aspect-ratio: 1 / 1;
            margin-bottom: 10px;
        }

        .product-thumbnails {
            gap: 6px;
        }

        .product-thumbnail {
            flex: 0 0 calc(33.333% - 4px);
        }
    }

    /* Small Mobile (max-width: 375px) */
    @media (max-width: 375px) {
        .woo_pr_title {
            font-size: 20px;
        }

        .price-main {
            font-size: 24px;
        }

        .variation-option label {
            padding: 6px 10px;
            font-size: 11px;
            min-width: 50px;
        }

        .product-details-page .product-detail-add-cart-btn {
            padding: 5px 10px;
            font-size: 11px;
        }

        /* Image Gallery Small Mobile */
        .product-main-image {
            aspect-ratio: 1 / 1;
        }

        .product-thumbnail {
            flex: 0 0 calc(33.333% - 4px);
        }
    }

    /* Tablet Image Gallery */
    @media (min-width: 577px) and (max-width: 768px) {
        .product-main-image {
            min-height: 400px;
            flex: 1;
        }

        .product-thumbnail {
            flex: 0 0 calc(20% - 6px);
        }
    }

    /* Desktop - Match heights */
    @media (min-width: 992px) {
        .col-lg-5 {
            display: flex;
            align-items: stretch;
        }

        .product-image-gallery {
            height: 100%;
        }

        .product-main-image {
            min-height: 0;
            height: calc(100% - 100px); /* Subtract thumbnails height */
        }
    }
