/*@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&display=swap');*/

:root {
    --primary-color: #2E86AB;
    --secondary-color: #19457B;
    --accent-color: #F18F01;
    --text-primary: #19457B;
    --text-secondary: #666666;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'SVN-Gilroy', sans-serif;
}

/* Product Detail Container */
.product-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0 60px;
}

/* Left Column (60%) */
.product-left-column {
    flex: 3;
    min-width: 300px;
}

/* Right Column (40%) */
.product-right-column {
    flex: 2;
    min-width: 300px;
}

/* Product Gallery - Layout mới với thumbnails bên trái */
.product-gallery {
    margin-bottom: 30px;
    /* padding-bottom: 40px; */
    display: flex;
    gap: 16px;
}

/* Cột thumbnails bên trái */
.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 68px;
    flex-shrink: 0;
    max-height: 400px;
    overflow: hidden;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
}

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

.thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.thumbnail:hover {
    border-color: var(--primary-color);
    opacity: 0.8;
    transform: scale(1.05);
}

/* Main image bên phải */
.product-main-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 400px;
    background-color: var(--bg-light);
    flex: 1;
    border: 1px solid var(--border-color);
}

/* Đảm bảo thumbnails không vượt quá height của main image */
.product-gallery {
    align-items: flex-start;

}

.product-slider {
    width: 100%;
    height: 100%;
}

.slide {
    width: 100%;
    height: 100%;
    display: none;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
    color: var(--text-primary);
}

.prev-slide {
    left: 10px;
}

.next-slide {
    right: 10px;
}

.slider-nav:hover {
    background: var(--white);
    box-shadow: var(--shadow-light);
    transform: translateY(-50%) scale(1.1);
}

/* Product Title & Info */
.product-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.product-short-desc {
    color: #666471;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    line-height: 125%;
}

/* Product Sizes - Tiered Pricing Display */
.product-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--border-color);
}

.size-option {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    background-color: var(--white);
    transition: var(--transition);
}

.size-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.size-price {
    font-size: 20px;
    font-weight: 600;
    color: #0C0C0C;
}

.unit {
    font-size: 16px;
    font-weight: 600;
    color: #0C0C0C;
}

/* Product Variants */
.product-variants {
    margin-bottom: 32px;
}

.variant-label {
    font-size: 16px;
    font-weight: bold;
    line-height: 150%;
    color: var(--text-primary);
    margin-bottom: 12px;
    margin-top: 24px;
}

.variant-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.variant-option {
    padding: 12px;
    border: 2px dashed var(--border-color);
    border-radius: 1px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.variant-option:hover, .variant-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(46, 134, 171, 0.05);
}

.variant-image-wrap {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 1px solid var(--border-color);
}

.variant-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.variant-name {
    font-size: 14px;
    font-weight: 500;
    color: #1F1F1F;
    margin: 0;
    line-height: 1.3;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 16px;
}

.primary-button, .secondary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.primary-button {
    flex: 50%;
    background: linear-gradient(90deg, #19457B 0%, #0F6B87 100%);
    color: var(--white);
    border: none;
    box-shadow: 0px 0px 0px 1px #39C3ED;

}


.secondary-button {
    flex: 50%;
    background: #FFFFFF;
    color: #19457B;
    border: 1.2px solid var(--color-info-200, #B4EFFD);
    box-shadow: -3px -3px 8px 0px #79E9E4B2 inset;
}

.secondary-button:hover {
    background-color: rgba(46, 134, 171, 0.1);
}

/* Product Description */
.product-description-section {
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #0FBAB3;
    text-transform: uppercase;
    margin: 0px 0 16px 0;
    padding-bottom: 8px;
    padding-top: 20px;
    border-top: 2px dashed #e5e7eb;
}

.product-description-content {
    color: var(--text-secondary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.product-description-content p {
    margin-bottom: 16px;
}

.product-description-content ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.product-description-content li {
    margin-bottom: 8px;
}

/* Product Specifications */
.product-specs-section {
    margin-bottom: 40px;
}

.specs-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background-color: #F3F3F4;
    padding: 8px;
    border-radius: 16px;
}

.tab-btn {
    flex: auto;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    margin: 0;
    position: relative;
    font-family: 'SVN-Gilroy', sans-serif;
}

.tab-btn:hover {
    background-color: #FFFFFF;
    box-shadow: 0px 4px 6px -2px #110C223A;
    transform: translateY(-1px);
}

.tab-btn.active {
    background-color: #FFFFFF;
    color: #19457B;
    box-shadow: 0px 3px 4px -2px #110C221A;
    font-weight: 600;
    
}

.tab-content {
    display: none;
    padding: 20px 0px;
    margin-top: 16px;
}

.tab-content.active {
    display: block;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th, .specs-table td {
    padding: 12px 0px;
    text-align: left;
    border-bottom: 1px solid #D7F5FE;
}

.specs-table th {
    font-weight: 500;
    color: #666471;
    width: 40%;
}

.specs-table td {
    text-align: end;
    color: var(--text-secondary);
}

.gallery-vinapet img {  
    width: 100%;    
    height: auto;
}

/* Related Products */
.related-products {
    margin: 60px 0;
}

.related-products .section-title {
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 20px;
    color: #19457B;
    font-family: 'baloo 2', sans-serif;
    border-top: 1px solid #D9D8DC;
}

/* Fix for product card in related products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.product-card {
    position: relative;
    width: 100%;
    /*height: 360px;*/
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid rgba(217, 216, 220, 1);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    padding-top: 130%;
}

.product-card:hover .arrow-icon {
    opacity: 1; /* Hiện icon khi hover */
    transform: translateX(0);
}

.product-image {
    width: 100%;
    /*height: 100%;*/
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
}

.product-overlay {
    position: absolute;
    bottom: 4px;
    left: 12px;
    right: 12px;
    width: calc(100% - 60px);
    height: 82px;
    background: rgba(6, 29, 57, 0.8);
    border-radius: var(--border-radius);
    border: 1px solid #FFFFFFCC;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.3s ease;
}

.product-card:hover .product-overlay {
    background: rgba(6, 29, 57, 1); /* Tăng opacity lên 100% khi hover */
}

.product-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
}
.product-overlay .product-description {
	text-align: center;
}

.product-card .product-title {
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
	
}

.product-card .title-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
    display: block;
}

/* Arrow Icon */
.arrow-icon {
    position: absolute;
    right: 16px;
    transform: translateY(-50%) translateX(10px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 24px;
    height: 24px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-icon svg {
    width: 24px;
    height: 24px;
}

.product-card:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

.product-card .product-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 4px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-container {
        gap: 30px;
    }
    
      .product-thumbnails {
        max-height: 350px;
    }
    
    .product-main-image {
        height: 350px;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .product-detail-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .product-left-column,
    .product-right-column {
        width: 100%;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-gallery {
        flex-direction: column;
        gap: 16px;
    }
    
    .product-thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 0;
        gap: 8px;
    }
    
    .thumbnail {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }
    
    .product-main-image {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .product-sizes {
        flex-direction: column;
        gap: 10px;
    }
    
    .variant-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .specs-table th, .specs-table td {
        padding: 10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-main-image {
        height: 250px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .product-thumbnails {
        gap: 6px;
    }
}

/* Print styles */
@media print {
    .product-actions,
    .slider-nav,
    .product-thumbnails {
        display: none;
    }
    
    .product-detail-container {
        display: block;
    }
    
    .product-left-column,
    .product-right-column {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    .tab-content {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .related-products {
        display: none;
    }
}

.size-option {
    position: relative;
    cursor: pointer;
}

.size-option:hover .tiered-pricing {
    display: block !important;
}

.price-from {
    font-size: 0.9em;
    color: #666;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-left: 8px;
    font-size: 0.9em;
}

.tiered-pricing {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    min-width: 200px;
}

.pricing-tiers .tier {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.qty-range {
    color: #666;
}

.tier-price {
    font-weight: bold;
    color: #333;
}


/* Read More - Wrapper */
.product-description-content .description-wrapper {
    position: relative;
}

/* Short và Full text */
.product-description-content .short-text,
.product-description-content .full-text {
    line-height: 1.6;
    color: #333;
}

/* Giữ nguyên formatting từ WordPress editor */
.product-description-content .short-text p,
.product-description-content .full-text p {
    margin-bottom: 1em;
}

.product-description-content .short-text ul,
.product-description-content .full-text ul {
    margin: 1em 0;
    padding-left: 2em;
}

.product-description-content .short-text li,
.product-description-content .full-text li {
    margin-bottom: 0.5em;
}

.product-description-content .short-text strong,
.product-description-content .full-text strong {
    font-weight: 700;
}

.product-description-content .short-text em,
.product-description-content .full-text em {
    font-style: italic;
}

/* Read More Button */

.product-description-content .read-more-btn {
    background: none;
    border: none;
    color: #19457B;
    cursor: pointer;
    font-weight: 700;
    font-size: inherit;
    padding-left: 0px;
}

.product-description-content .read-more-btn:hover {
    color: #0FBAB3;
    padding: 8px 0;
    margin-top: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}


.product-description-content .read-more-btn:hover {
    color: #0FBAB3;
}

.product-description-content .read-more-btn:hover::after {
    width: 100%;
}

/* Animation cho expand/collapse */
.product-description-content .short-text,
.product-description-content .full-text {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .product-description-content .short-text,
    .product-description-content .full-text {
        font-size: 14px;
    }
}