/* home_redesign.css */

/* Layout Wrapper - Removing the split */
body {
    overflow-x: clip;
    width: 100%;
}

.home-redesign-wrapper {
    /* Kept for compatibility if needed, but not used for split anymore */
}

/* Sections Base */
.hr-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hr-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Light Theme Hero Slider Redesign -> Minimalist Apple Style */
.full-hero-wrapper {
    background: transparent;
    padding-top: 0;
}
.dark-hero {
    border-radius: 0;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    background: 
        radial-gradient(circle at 15% 50%, rgba(0, 113, 227, 0.04), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 113, 227, 0.04), transparent 25%),
        #f5f5f7;
    min-height: 85vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    box-shadow: none;
    padding-top: 80px;
    padding-bottom: 50px;
}

.dark-hero-slide {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 0 8%;
    box-sizing: border-box;
    z-index: 1;
    position: relative;
    gap: 20px;
}

.dark-hero-image {
    position: relative;
    width: 50%;
    max-width: none;
    flex: 1;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.dark-hero-image::after {
    display: none;
}

.dark-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 50vh;
    transform: scale(1.1) translateY(10px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
}

.swiper-slide-active .dark-hero-image img {
    transform: scale(1) translateY(0);
    opacity: 1;
    transition: transform 6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1.2s ease-out;
}

.dark-hero-content {
    position: relative;
    z-index: 3;
    width: 45%;
    margin: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.dark-hero-subtitle {
    font-size: 2rem;
    color: #86868b;
    margin-bottom: 5px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s;
    letter-spacing: -0.5px;
    text-shadow: none;
}

.dark-hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    color: #1d1d1f;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s;
    text-shadow: none;
    letter-spacing: -1.5px;
}

.highlight-text {
    color: #0071e3;
    font-weight: 700;
}

.highlight-title {
    color: #0071e3;
}

.dark-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0071e3;
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
    width: fit-content;
    box-shadow: none;
}

.dark-hero-btn:hover {
    background: #0077ed;
    color: #fff;
    box-shadow: none;
    transform: scale(1.03) !important;
}

.desktop-only {
    display: inline-flex;
}

.mobile-only {
    display: none;
}

/* Animations for Active Slide */
.swiper-slide-active .dark-hero-title,
.swiper-slide-active .dark-hero-subtitle,
.swiper-slide-active .dark-hero-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Swiper Controls Customization */
.dark-hero-nav {
    color: #111 !important;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.3s, transform 0.3s;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.dark-hero-nav::after {
    font-size: 18px !important;
}

.dark-hero:hover .dark-hero-nav {
    opacity: 1;
    /* Show on hover */
}

.dark-hero-nav:hover {
    transform: scale(1.1);
}

.dark-hero-pagination {
    bottom: 30px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
    z-index: 10 !important;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dark-hero-pagination .swiper-pagination-bullet {
    background: rgba(0, 0, 0, 0.2);
    width: 10px;
    height: 10px;
    margin: 0 !important;
    transition: all 0.3s;
}

.dark-hero-pagination .swiper-pagination-bullet-active {
    background: #1d1d1f;
    width: 30px;
    border-radius: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .dark-hero {
        min-height: 70vh;
        padding-top: 20px;
    }
}
@media (max-width: 768px) {
    .full-hero-wrapper {
        padding-top: 0;
    }
    .dark-hero {
        min-height: auto;
        padding-top: 0;
    }

    .dark-hero-slide {
        flex-direction: column;
        justify-content: flex-start;
        padding-bottom: 70px;
        padding-left: 0;
        padding-right: 0;
        gap: 0;
    }
    
    .dark-hero-image {
        order: 1;
        width: 100%;
        max-height: 45vh;
        margin-top: 0;
        justify-content: center;
        align-items: center;
    }
    
    .dark-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Cover ensures it fills the entire space */
        filter: none; /* Remove drop shadow for full bleed image */
    }

    .dark-hero-content {
        order: 2;
        margin: 15px 0 0 0;
        width: 100%;
        padding: 0 20px;
        text-align: center;
        align-items: center;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        order: 3;
        display: inline-flex !important;
        margin-top: 15px;
        width: 80%;
        padding: 12px 20px;
    }

    .dark-hero-title {
        font-size: 2.2rem;
        margin-bottom: 5px;
    }
    
    .dark-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .dark-hero-pagination {
        bottom: 15px !important;
    }
}

.dark-hero-content {
    padding-left: 0;
    flex: none;
}

.dark-hero-title {
    font-size: 2.2rem;
}

.dark-hero-subtitle {
    font-size: 0.95rem;
    margin: 0 auto 20px auto;
}

/* Categories */
.hr-categories {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 10px;
}

.hr-categories::-webkit-scrollbar {
    display: none;
}

.hr-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
    text-decoration: none;
    color: #333;
}

.hr-category-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
    color: #111;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.hr-category-item:hover .hr-category-icon {
    background: #f4f4f4;
    transform: translateY(-2px);
}

.hr-category-name {
    font-size: 0.85rem;
    font-weight: 700;
}

/* Products Grid */
.hr-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.hr-product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: #333;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transform: translate3d(0, 0, 0);
    will-change: transform;
    cursor: pointer !important;
    z-index: 50;
}

.hr-product-card * {
    cursor: pointer !important;
}

.hr-product-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: transparent;
    transform: translate3d(0, -8px, 0);
}

.hr-product-img {
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    position: relative;
    background: #fff;
    overflow: hidden;
}

.hr-product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hr-product-card:hover .hr-product-img img {
    transform: scale(1.08);
}

.hr-product-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    color: #ccc;
    z-index: 10;
}

.hr-product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer !important;
    position: relative;
    z-index: 2;
}

.hr-product-info * {
    cursor: pointer !important;
}

.hr-product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    color: #333;
}

.hr-product-price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.hr-product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111;
}

.hr-product-price-old {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

/* Flash Sale specifics */
.hr-flash-timer {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-left: 10px;
}

.hr-flash-timer-box {
    background: #ff4757;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    min-width: 28px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.hr-flash-timer-colon {
    font-weight: bold;
    color: #ff4757;
}

.hr-progress-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

.hr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9f43, #ff4757, #ea580c, #ff4757, #ff9f43);
    background-size: 200% 100%;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    animation: progressBarFlow 3s ease infinite, hrProgressSlideIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    transform-origin: left;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.4);
}

.hr-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
    animation: progressShine 2.5s ease-in-out infinite 1s;
}

@keyframes progressBarFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hrProgressSlideIn {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.hr-progress-text {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    text-align: right;
}

/* Todays For You Tabs */
.hr-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    justify-content: center;
}

.hr-tab {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.hr-tab.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Best Selling Store Layout */
.hr-store-layout {
    display: flex;
    gap: 20px;
}

.hr-store-banner {
    flex: 0 0 25%;
    background: #d1d5db;
    /* Greyish background as per mockup */
    border-radius: 8px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    min-height: 400px;
    background-image: url('https://via.placeholder.com/400x600?text=BeliBeli+Mall');
    /* Placeholder */
    background-size: cover;
    background-position: center;
    color: #111;
}

.hr-store-banner h3 {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.hr-store-banner p {
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.hr-store-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
}

.hr-store-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.hr-store-card-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.hr-store-card-logo {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #3b82f6;
    position: relative;
}

.hr-store-card-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #3b82f6;
    color: white;
    font-size: 0.6rem;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hr-store-card-info {
    flex: 1;
}

.hr-store-card-name {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.hr-store-card-desc {
    font-size: 0.8rem;
    color: #666;
}

.hr-store-products {
    display: flex;
    gap: 10px;
}

.hr-store-product {
    flex: 1;
    background: #f8fafc;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.hr-store-product img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.hr-store-product-price {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 5px;
}

/* Badges & Out of Stock */
.hr-badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4757;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 20px;
    z-index: 10;
}

.hr-badge-stock {
    position: absolute;
    bottom: 10px;
    left: 10px;
    top: auto;
    right: auto;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 10;
}

.hr-product-card.out-of-stock .hr-product-img img {
    filter: blur(3px) grayscale(50%);
    opacity: 0.7;
}

.hr-out-of-stock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 20px;
    z-index: 10;
    pointer-events: none;
    font-size: 0.8rem;
}

/* Hover Actions */
.hr-product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    transition: bottom 0.3s;
    z-index: 20;
}

/* Hover override is no longer strictly needed but keeping it safe */
.hr-product-card:hover .hr-product-actions {
    bottom: 0;
}

.hr-btn-action {
    background: #111;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hr-btn-action:hover {
    background: #ff4757;
    color: white;
}

/* Swiper overrides */
.hr-hero.swiper {
    padding: 0;
}

.hr-hero .swiper-slide {
    display: flex;
    align-items: center;
    min-height: 300px;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .hr-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hr-store-layout {
        flex-direction: column;
    }

    .hr-store-banner {
        min-height: 200px;
    }

    .hr-hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hr-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hr-product-actions {
        bottom: 0;
        background: rgba(255, 255, 255, 0.85);
        padding: 8px;
    }

    .hr-btn-action {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .hr-store-grid {
        grid-template-columns: 1fr;
    }

    .hr-hero-content {
        padding: 25px;
        position: relative;
        z-index: 2;
        background: rgba(255, 255, 255, 0.85);
    }

    .hr-hero-image {
        opacity: 0.3;
        width: 100%;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .hr-categories {
        padding-bottom: 15px;
        gap: 10px;
    }

    .hr-section {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .hr-hero {
        min-height: 220px;
    }

    .hr-hero-title {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .hr-hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .hr-hero-content {
        padding: 20px 15px;
    }

    .hr-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hr-section {
        padding: 12px;
    }

    .hr-section-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .hr-category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .hr-category-name {
        font-size: 0.75rem;
    }

    .hr-flash-timer-box {
        padding: 4px 6px !important;
        font-size: 0.85rem !important;
    }

    .hr-product-card .hr-product-title {
        font-size: 0.85rem;
    }

    .hr-product-card .hr-product-price {
        font-size: 0.9rem;
    }
}