/* ==========================================================================
   King Watsadu Modern Storefront - Refined & Aesthetic Design
   ========================================================================== */

.home-main-wrapper {
    background-color: #f8fafc;
    font-family: 'Prompt', sans-serif;
    color: #1e293b;
}

/* Hero Section & Banners */
.hero-banner-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}

.hero-carousel-item {
    height: 100%;
    background-color: #ffffff;
    overflow: hidden;
}

.hero-carousel-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-carousel-item:hover img {
    transform: scale(1.025);
}

/* Glassmorphism Slider Navigation Controls */
#mainHeroCarousel .carousel-control-prev,
#mainHeroCarousel .carousel-control-next,
#promoteCarousel .carousel-control-prev,
#promoteCarousel .carousel-control-next {
    width: 54px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

#mainHeroCarousel:hover .carousel-control-prev,
#mainHeroCarousel:hover .carousel-control-next,
#promoteCarousel:hover .carousel-control-prev,
#promoteCarousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-btn-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
}

.carousel-control-btn-circle:hover {
    background: #FFC107;
    transform: scale(1.1);
}

.carousel-control-btn-circle:hover i {
    color: #1a1a24 !important;
}

/* Modern Pill Indicators */
.carousel-indicators {
    margin-bottom: 1rem;
    gap: 8px;
    z-index: 4;
}

.carousel-indicators [data-bs-target] {
    width: 24px;
    height: 6px;
    border-radius: 4px;
    border: none;
    background-color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    opacity: 1;
}

.carousel-indicators .active {
    width: 42px;
    background-color: #FFC107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.7);
}

/* Hero Right Side Service Guarantee Cards */
.hero-service-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.hero-service-card-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.25s ease;
}

.hero-service-card-item:hover {
    border-color: #fcd34d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

.hero-service-card-item:hover::before {
    background: #FFC107;
}

.hero-service-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4D4D4D 0%, #333333 100%);
    color: #FFC107;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease;
}

.hero-service-card-item:hover .hero-service-icon-box {
    transform: scale(1.08) rotate(4deg);
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: #1a1a24;
}

/* Responsive Heights */
@media (max-width: 992px) {
    .hero-carousel-item {
        height: 320px;
    }
}
@media (max-width: 768px) {
    .hero-carousel-item {
        height: 230px;
    }
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
}

/* Category Grid & Bubbles */
.category-bubble-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #334155;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    padding: 18px 12px;
    transition: all 0.25s ease;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.02);
}

.category-bubble-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #fcd34d;
    color: #d97706;
}

.cat-icon-wrapper {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    margin-bottom: 10px;
    transition: transform 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.category-bubble-item:hover .cat-icon-wrapper {
    transform: scale(1.12);
}

.cat-bubble-name {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 3px;
    color: #1e293b;
}

.cat-bubble-sub {
    font-size: 0.74rem;
    color: #94a3b8;
}

/* Category Horizontal Scroll Slider (2 Rows) */
.category-scroll-container {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: calc(33.333% - 8px);
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 2px 8px 2px;
    scroll-behavior: smooth;
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-scroll-container .category-bubble-item {
    scroll-snap-align: start;
}

@media (max-width: 992px) {
    .category-scroll-container {
        grid-auto-columns: calc(50% - 6px);
    }
}
@media (max-width: 576px) {
    .category-scroll-container {
        grid-auto-columns: calc(50% - 6px);
    }
}

/* Modern Section Bar Header - โทนสี #4D4D4D ตัดขอบทอง #FFC107 */
.modern-section-bar {
    background: #4D4D4D;
    border-left: 6px solid #FFC107;
    border-radius: 14px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
    position: relative;
    overflow: hidden;
}

.modern-section-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.04) 100%);
    pointer-events: none;
}

.modern-section-bar.shock-deal {
    background: linear-gradient(90deg, #3d3d3d 0%, #b91c1c 65%, #dc2626 100%);
    border-left: 6px solid #FFC107;
}

.sec-bar-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sec-bar-title i {
    color: #FFC107;
    font-size: 1.35rem;
}

.sec-bar-sub {
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 400;
}

.sec-bar-chips {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sec-chip {
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sec-chip:hover,
.sec-chip.active {
    background: #FFC107;
    color: #1a1a24;
    border-color: #FFC107;
    font-weight: 600;
}

.btn-view-all {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-view-all:hover {
    background: #FFC107;
    color: #1a1a24;
    border-color: #FFC107;
}

/* Flash Countdown Timer Pill */
.shock-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    padding: 4px 14px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.84rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shock-digit {
    background: #ef4444;
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

/* Product Card - Professional E-Commerce Look */
.ecommerce-pro-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ecommerce-pro-card:hover {
    border-color: #fcd34d;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.card-badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.card-badge-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10b981;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    z-index: 2;
}

.pro-img-box {
    width: 100%;
    padding-top: 100%;
    position: relative;
    background: #fafafa;
    overflow: hidden;
    display: block;
}

.pro-img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.4s ease;
}

.ecommerce-pro-card:hover .pro-img-box img {
    transform: scale(1.06);
}

.pro-card-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 8px;
}

.pro-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    transition: color 0.2s ease;
}

.pro-card-title:hover {
    color: #ea580c;
}

.pro-price-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.price-curr {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e11d48;
}

.price-orig {
    font-size: 0.78rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.btn-add-cart {
    background: #f1f5f9;
    color: #334155;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.ecommerce-pro-card:hover .btn-add-cart {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: #1a1a24;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

/* Brand Partners Cards */
.brand-logo-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 16px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.brand-logo-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.07);
    transform: translateY(-3px);
}

.brand-logo-card img {
    max-width: 100%;
    max-height: 85px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(10%);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.brand-logo-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}
