/* Hero Banner Area Professional Styles */
.hero_banner_area {
    position: relative;
    overflow: hidden;
    background-color: #f0f2f5;
}

/* Height Management - Using aspect-ratio to prevent cropping */
.banner-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1444 / 490; /* Desktop Aspect Ratio */
    overflow: hidden;
}

@media (max-width: 767px) {
    .banner-img-container {
        aspect-ratio: 751 / 477; /* Mobile Aspect Ratio */
        height: auto;
    }
}

/* Ensures image fills the container without stretching */
.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This is key: it clips the image to fill the area instead of stretching it */
    object-position: center;
    transition: transform 12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Ken Burns effect removed as per user request */
.carousel-item.active .banner-img {
    transform: none;
}

/* Premium Indicators */
.custom-indicators {
    bottom: 20px;
    z-index: 15;
    margin-bottom: 0;
}

.custom-indicators [data-bs-target] {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    margin: 0 6px !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
    border: 2px solid transparent !important;
    transition: all 0.4s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    opacity: 0.8 !important;
}

.custom-indicators .active {
    background-color: #fff !important;
    width: 30px !important;
    border-radius: 10px !important;
    transform: scale(1.1) !important;
    opacity: 1 !important;
}

/* Glassmorphism Navigation Controls */
.custom-control {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 18px !important;
    z-index: 20;
}

.hero_banner_area:hover .custom-control {
    opacity: 1 !important;
}

/* Position arrows closer to edges on desktop */
.carousel-control-prev.custom-control {
    left: 20px !important;
}

.carousel-control-next.custom-control {
    right: 20px !important;
}

@media (max-width: 767px) {
    .carousel-control-prev.custom-control {
        left: 10px !important;
    }
    .carousel-control-next.custom-control {
        right: 10px !important;
    }
    .custom-control {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
        opacity: 0.7 !important; /* Visible on mobile */
    }
}

.custom-control:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-50%) scale(1.05) !important;
}

/* Smooth Fade Transition */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: 0.8s;
    transition-property: opacity;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

/* Banner Link utility */
.banner-link {
    display: block;
    width: 100%;
    cursor: pointer;
}
/* Popular Categories Refined Styles */
.popular__category {
    background-color: #fff;
    overflow: hidden;
}

.category-card-item {
    padding: 10px;
    height: 100%;
}

.category-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-icon-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    border: 1px solid #eee;
    transition: all 0.4s ease;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.category-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.category-title-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    transition: all 0.3s ease;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hover Effects */
.category-card-item:hover .category-icon-box {
    background: #fff;
    border-color: #ae231e;
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(174, 35, 30, 0.15);
}

.category-card-item:hover .category-icon-img {
    transform: scale(1.15) rotate(2deg);
}

.category-card-item:hover .category-title-text {
    color: #ae231e;
}

/* Mobile Responsive Adjustments */
@media (max-width: 767px) {
    .category-icon-box {
        padding: 0;
    }
    
    .category-title-text {
        font-size: 14px;
        font-weight: 600;
    }
}

/* Advertisement Banners Refined Styles */
.adv-banner-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #eee;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.adv-banner-image {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.banner-img-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.adv-banner-card:hover .banner-img-main {
    transform: scale(1.1);
}

.adv-banner-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    transition: all 0.5s ease;
}

.adv-banner-card:hover::after {
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

/* For Light Theme Banners - Subtle light gradient */
.adv-banner-card:has(.theme-light)::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
}

.adv-banner-card:has(.theme-light):hover::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 60%, transparent 100%);
}

.adv-banner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 40px;
    z-index: 2;
    pointer-events: none;
}

.adv-banner-content > * {
    pointer-events: auto;
}

/* Theme Light (Usually dark text on light bg) */
.adv-banner-content.theme-light {
    color: #333;
}

/* Theme Dark (Usually light text on dark/busy bg) */
.adv-banner-content.theme-dark {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.adv-subtitle {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.adv-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 25px;
    color: inherit;
}

.adv-title a {
    color: inherit;
    text-decoration: none;
}

.btn-adv-shop {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: #ae231e;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(174, 35, 30, 0.3);
}

.btn-adv-shop:hover {
    background: #333;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.btn-adv-shop i {
    margin-left: 10px;
    font-size: 12px;
}

/* Responsive Ads */
@media (max-width: 1199px) {
    .adv-banner-content {
        padding: 25px;
        width: 70%;
    }
    .adv-title {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .adv-banner-content {
        width: 80%;
        padding: 20px;
    }
    .adv-subtitle {
        font-size: 11px;
        margin-bottom: 8px;
    }
    .adv-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    .btn-adv-shop {
        padding: 8px 20px;
        font-size: 12px;
    }
}


/* Top Suppliers Section Styles */
.supplier-card-link-wrapper {
    text-decoration: none;
    display: block;
    color: inherit;
    transition: transform 0.3s ease;
}

.supplier-card-link-wrapper:hover {
    transform: translateY(-5px);
}

.supplier-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.supplier-card-link-wrapper:hover .supplier-card {
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border-color: rgba(174, 35, 30, 0.2);
}

/* Banner Colors */
.card-banner {
    height: 90px;
    position: relative;
    padding: 15px;
}

.card-banner.color-1 { background: linear-gradient(135deg, #FF9A9E 0%, #FAD0C4 100%); }
.card-banner.color-2 { background: linear-gradient(135deg, #A1C4FD 0%, #C2E9FB 100%); }
.card-banner.color-3 { background: linear-gradient(135deg, #84FAB0 0%, #8FD3F4 100%); }
.card-banner.color-4 { background: linear-gradient(135deg, #F6D365 0%, #FDA085 100%); }
.card-banner.color-5 { background: linear-gradient(135deg, #E0C3FC 0%, #8EC5FC 100%); }
.card-banner.color-6 { background: linear-gradient(135deg, #FFF1EB 0%, #ACE0F9 100%); }
.card-banner.color-7 { background: linear-gradient(135deg, #A8E6CF 0%, #DCEDC1 100%); }
.card-banner.color-8 { background: linear-gradient(135deg, #FFD3B6 0%, #FFAAA5 100%); }

.verified-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.supplier-logo {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 3px solid #fff;
    overflow: hidden;
}

.supplier-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.card-body-custom {
    padding: 45px 15px 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.supplier-name {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.supplier-contact {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.stat-item {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    color: #555;
    border: 1px solid #eee;
}

.stat-item.gst {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.stat-item i {
    font-size: 12px;
}

@media (max-width: 767px) {
    .card-banner { height: 75px; }
    .supplier-logo { width: 50px; height: 50px; bottom: -25px; font-size: 16px; }
    .card-body-custom { padding-top: 35px; }
    .supplier-name { font-size: 14px; }
    .supplier-contact { font-size: 12px; }
    .stat-item { font-size: 10px; padding: 3px 8px; }
}
