/* Hero Banner */
.hero-banner {
    background-image: url('images/Product Header.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* Blurred transition line at bottom of hero banner */
.hero-banner::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 200px;
    background: linear-gradient(to bottom, 
        transparent 0%,
        rgba(255, 255, 255, 0.1) 15%,
        rgba(255, 255, 255, 0.3) 30%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.85) 70%,
        rgba(255, 255, 255, 0.95) 85%,
        #ffffff 100%);
    z-index: 1;
    pointer-events: none;
    filter: blur(8px);
    -webkit-filter: blur(8px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
}

.hero-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding-top: 0;
}

.hero-content {
    text-align: center;
    color: #ffffff;
    margin-top: 0;
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #603913;
    position: relative;
    z-index: 2;
}

/* Main Section */
.main-section {
    position: relative;
    background-color: #ffffff;
    padding-top: 100px;
}

.main-section::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -50px;
    height: 100px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 30%,
        rgba(255, 255, 255, 0.9) 70%,
        #ffffff 100%);
    z-index: 0;
    pointer-events: none;
    filter: blur(6px);
    -webkit-filter: blur(6px);
}

.main-section .container {
    margin: 0 auto;
    position: relative;
    z-index: 1;
    max-width: unset;
    padding: 0;
}

/* Country Selector - Two Column Dropdown Style */
.filter_country {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 0 20px;
    z-index: 10;
}

.country-item {
    position: relative;
}

/* Center last item when odd count */
.filter_country.has-odd-count .country-item.last-item-odd {
    grid-column: 1 / -1;
    width: calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
    margin: 0 auto;
}

.country-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 15px;
    width: 100%;
    background-color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
}

.country-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 3px 6px rgba(0, 0, 0, 0.2);
    background-color: #a0937d;
}

.country-btn-active {
    background-color: #603913;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.country-flag-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.country-name {
    flex: 1;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-size: 1rem;
}


/* Product Tabs - Custom Carousel Styling */
.custom-carousel {
    padding: 3rem 0;
}

.carousel-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.carousel-wrapper {
    width: 100%;
}

.carousel {
    background: #e6e7e8;
    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;
    background: #e6e7e8;
    border-top-left-radius: 0;
    border-top-right-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

/* Dynamic z-index for overlapping tabs */
.carousel .controls .nav li:nth-child(1) { z-index: 6; }
.carousel .controls .nav li:nth-child(2) { z-index: 5; }
.carousel .controls .nav li:nth-child(3) { z-index: 4; }
.carousel .controls .nav li:nth-child(4) { z-index: 3; }
.carousel .controls .nav li:nth-child(5) { z-index: 2; }
.carousel .controls .nav li:nth-child(6) { z-index: 1; }

.carousel .controls .nav li.active { 
    color: #333 !important;
    filter: none;
    background: #ffffff;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
}

.carousel .controls .nav li:hover {
    background: #e9e9e9;
    transform: translateY(-1px);
}

.carousel-item { 
    background: #e6e7e8; 
    display: none;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.carousel-item.active {
    display: block;
    opacity: 1;
}

.carousel-inner { 
    background: #e6e7e8; 
    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: #603913;
    text-align: center;
    margin-bottom: 3rem;
}

.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;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333333;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* 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 #e6e7e8;
    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;
}

/* Detail content wrapper - flex container for image and info */
.detail-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    position: relative;
    width: 100%;
}

.close-detail-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #603913;
    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: #603913;
    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;
    display: flex;
    flex-direction: column;
}

/* Buy online button alignment - right align for normal layout */
.detail-info .btn.btn-primary {
    align-self: flex-end;
    margin-top: 15px;
}

.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;
}

/* Ensure spacing between paragraphs inside product detail description */
.detail-description p {
    margin: 0 0 1rem 0;
}

/* 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;
    }
    
    .filter_country {
        position: absolute;
        bottom: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 900px;
        margin: 0;
        gap: 0.75rem;
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
        z-index: 10;
    }
    
    .filter_country.has-odd-count .country-item.last-item-odd {
        width: calc((100% - 0.75rem) / 2);
        max-width: calc((100% - 0.75rem) / 2);
    }
    
    .country-btn {
        padding: 8px 14px;
        font-size: 13px;
        gap: 10px;
    }
    
    .country-flag-icon {
        width: 36px;
        height: 36px;
        border: 2px solid rgba(0, 0, 0, 0.3);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .country-name {
        font-size: 13px;
    }
    
    .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: left;
    }
    
    .detail-description {
        font-size: 1.1rem;
        text-align: left;
    }
}

/* Mobile Large (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .main-section .container {
        max-width: 800px;
    }
    
    .filter_country {
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 700px;
        margin: 0;
        gap: 0.75rem;
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
        z-index: 10;
    }
    
    .filter_country.has-odd-count .country-item.last-item-odd {
        width: calc((100% - 0.75rem) / 2);
        max-width: calc((100% - 0.75rem) / 2);
    }
    
    .country-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 8px;
    }
    
    .country-flag-icon {
        width: 32px;
        height: 32px;
        border: 2px solid rgba(0, 0, 0, 0.3);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .country-name {
        font-size: 12px;
    }
    
    /* 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: left;
    }
    
    .detail-description {
        font-size: 1rem;
        text-align: left;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    .main-section .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .filter_country {
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 500px;
        margin: 0;
        gap: 0.75rem;
        grid-template-columns: 1fr;
        padding: 0 15px;
        z-index: 10;
    }
    
    .filter_country.has-odd-count .country-item.last-item-odd {
        width: 100%;
        max-width: 100%;
    }
    
    .country-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 8px;
    }
    
    .country-flag-icon {
        width: 30px;
        height: 30px;
        border: 2px solid rgba(0, 0, 0, 0.3);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .country-name {
        font-size: 12px;
    }
    
    /* 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;
        margin-bottom: 15rem;
    }
    
    .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: left;
    }
    
    .detail-description {
        font-size: 0.95rem;
        text-align: left;
    }
}

/* Extra Small Mobile (up to 500px) - Stack category tabs */
@media (max-width: 500px) {
    .carousel .controls .nav {
        flex-direction: column;
    }
    
    .carousel .controls .nav li {
        flex: none;
        min-width: 100%;
        width: 100%;
        margin-left: 0;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }
}