/* Hero Banner */
.hero-banner {
    background-image: url('images/product_Product Head.png');
    background-size: cover;
    background-position: center;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-banner::before, .hero-banner::after { content: none !important; background: transparent !important; }
.hero-banner { background-color: transparent; }
.hero-overlay::before, .hero-overlay::after { content: none !important; background: transparent !important; }

.hero-overlay {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
    padding-bottom: 0;
    padding-top: 130px;
}

.hero-overlay::before {
    content: '';
    flex: 1;
}

.hero-overlay::after {
    content: '';
    flex: 2;
}

.hero-content {
    text-align: center;
    color: #ffffff;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #ff0000;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Main Section */
.main-section {
    min-height: 80vh;
}

.main-section .container {
    margin: 0 auto;
    padding: 0 20px;
    max-width: 1400px;
}

/* Country Selector */
.country-selector {
    margin-bottom: 1rem;
}

.country-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.country-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 150px;
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #333333;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.25);
}

.country-btn.active {
    background-color: #606D61;
    color: #fff;
}

.country-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.35);
}

.flag-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Product Tabs - Custom Carousel Styling */
.custom-carousel {
    padding: 2rem 0;
}

.carousel-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.carousel-wrapper {
    width: 100%;
}

.carousel {
    background: #f0f0f0;
    border-radius: 0;
    position: relative;
}

.carousel .controls .nav {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 0;
}

.carousel .controls .nav li {
    cursor: pointer;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    color: #333;
    margin-left: -8px;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
    border-top-left-radius: 0;
    border-top-right-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Dynamic z-index for overlapping tabs */
.carousel .controls .nav li:nth-child(1) { z-index: 7; }
.carousel .controls .nav li:nth-child(2) { z-index: 6; }
.carousel .controls .nav li:nth-child(3) { z-index: 5; }
.carousel .controls .nav li:nth-child(4) { z-index: 4; }
.carousel .controls .nav li:nth-child(5) { z-index: 3; }
.carousel .controls .nav li:nth-child(6) { z-index: 2; }
.carousel .controls .nav li:nth-child(7) { z-index: 1; }

.carousel .controls .nav li.active { 
    color: #333 !important;
    filter: none;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.25) !important;
    background: #ffffff;
}

.carousel .controls .nav li:hover {
    background: #e9e9e9;
    transform: translateY(-1px);
}

.carousel-item { 
    background: #f0f0f0; 
    display: none;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.carousel-item.active {
    display: block;
    opacity: 1;
}

.carousel-inner { 
    background: #f0f0f0; 
    border-radius: 0; 
    position: relative;
    overflow: hidden;
}

.carousel-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333333;
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Inter', sans-serif;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    text-align: center;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    margin-bottom: 1rem;
    cursor: pointer;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Product card links */
.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-link:visited,
.product-link:hover,
.product-link:active {
    text-decoration: none;
    color: inherit;
}

.product-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333333;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* Retail price text inside product cards */
.product-link .rp,
.product-card .rp {
    margin-top: 10px;
    color: #333333;
    text-decoration: none;
}

.product-link .dp,
.product-card .dp {
    color: #333333;
    text-decoration: none;
}

/* Product Detail Panel */
.product-detail-panel {
    margin-top: 1rem;
    margin-bottom: 1rem;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    grid-column: 1 / -1; /* Span across all columns */
    width: 100%;
}

.product-detail-panel.show {
    transform: translateY(0);
    opacity: 1;
}

.detail-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    position: relative;
}

.close-detail-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ff0000;
    color: white;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-detail-btn:hover {
    background-color: #cc0000;
    transform: scale(1.1);
}

.detail-image {
    flex: 0 0 300px;
}

.detail-product-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.detail-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666666;
    margin-bottom: 0;
    font-family: 'Inter', sans-serif;
}

.rp {
    margin-top: 10px;
    color: #666666;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
}

/* Distributor price styled same as retail price */
.dp {
    color: #666666;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
}

/* Product detail "Buy Online" button alignment */
.detail-button-wrap {
    margin-top: 15px;
    text-align: right;
}

.detail-buy-btn {
    background-color: #606D61;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.1rem;
}

.detail-buy-btn:hover {
    filter: brightness(1.05);
}

/* Responsive Design */

/* Large Desktop (1200px and up) */
@media (max-width: 1200px) {
    .main-section .container {
        max-width: 1400px;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    .detail-image {
        flex: 0 0 350px;
    }
    
    .detail-product-image {
        height: 350px;
    }
    
    .detail-title {
        font-size: 1.4rem;
    }
    
    .detail-description {
        font-size: 1.2rem;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .main-section .container {
        max-width: 1400px;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .detail-image {
        flex: 0 0 280px;
    }
    
    .detail-product-image {
        height: 280px;
    }
    
    .detail-title {
        font-size: 1.3rem;
    }
    
    .detail-description {
        font-size: 1.1rem;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .main-section .container {
        max-width: 1000px;
    }
    
    .country-buttons {
        gap: 1.5rem;
    }
    
    .country-btn {
        padding: 8px 120px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }
    
    .category-title {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .product-detail-panel {
        padding: 1.2rem;
    }
    
    .detail-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .detail-image {
        flex: none;
        align-self: center;
    }
    
    .detail-product-image {
        height: 250px;
    }
    
    .detail-title {
        font-size: 1.4rem;
        text-align: center;
    }
    
    .detail-description {
        font-size: 1.1rem;
        text-align: center;
    }
}

/* Mobile Large (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .main-section .container {
        max-width: 800px;
    }
    
    .country-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .country-btn {
        width: 100%;
        max-width: 350px;
        justify-content: center;
        padding: 8px 100px;
    }
    
    /* Navigation tabs responsive fix */
    .carousel .controls .nav {
        flex-wrap: wrap;
        gap: 1px;
        margin-right: 0;
    }
    
    .carousel .controls .nav li {
        flex: 1;
        min-width: calc(33.333% - 1px);
        font-size: 13px;
        padding: 8px 6px;
        margin-left: 0;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .product-detail-panel {
        padding: 1rem;
    }
    
    .detail-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .detail-image {
        flex: none;
        align-self: center;
    }
    
    .detail-product-image {
        height: 200px;
    }
    
    .detail-title {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .detail-description {
        font-size: 1rem;
        text-align: center;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    .main-section .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .country-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .country-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 8px 80px;
    }
    
    /* Navigation tabs responsive fix */
    .carousel .controls .nav {
        flex-wrap: wrap;
        gap: 2px;
        margin-right: 0;
    }
    
    .carousel .controls .nav li {
        flex: 1;
        min-width: calc(50% - 1px);
        font-size: 12px;
        padding: 8px 4px;
        margin-left: 0;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-title {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .product-detail-panel {
        padding: 0.8rem;
    }
    
    .detail-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .detail-image {
        flex: none;
        align-self: center;
    }
    
    .detail-product-image {
        height: 180px;
    }
    
    .detail-title {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .detail-description {
        font-size: 0.95rem;
        text-align: center;
    }
}