/* --- Index Page Redesign --- */

/* Global Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.scroll-reveal {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Page Wrapper */
.index-page-wrapper {
    background: #f8f9fa;
    /* geometric background pattern override or blend */
    background-image: radial-gradient(#e0f2fe 2px, transparent 2px);
    background-size: 40px 40px;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    background: var(--bg-color);
    /* Use variable */
    position: relative;
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    align-items: center;
    /* Center horizontally */
    justify-content: center;
    /* Center vertically */
    text-align: center;
    /* Center text */
    gap: 40px;
    padding: 60px 5%;
    margin-bottom: 40px;
    overflow: visible;
}

.hero-bg-blob {
    position: absolute;
    width: 800px;
    height: 800px;
    background: var(--blob-color);
    /* Use variable for Aurora effect */
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-content {
    flex: 0 0 auto;
    max-width: 800px;
    /* Wider text area for centered look */
    z-index: 2;
    padding-right: 0;
    margin-bottom: 20px;
}

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

.hero-title {
    font-family: 'Great Vibes', cursive;
    /* Fancy Script */
    font-size: 80px;
    /* Increased for script readability */
    font-weight: 400;
    /* Script fonts usually don't need bold */
    line-height: 1.2;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    /* Dynamic Gradient */
    -webkit-background-clip: text;
    background-clip: text;
    /* Fix lint */
    -webkit-text-fill-color: transparent;
    padding: 10px;
    /* Prevent clipping of swashes */
}

.hero-subtitle {
    font-size: 20px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    /* Center buttons */
}

.btn-primary {
    padding: 15px 40px;
    background: linear-gradient(135deg, #4b6cb7, #182848);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(75, 108, 183, 0.3);
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-secondary {
    padding: 15px 40px;
    background: white;
    color: #4b6cb7;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.btn-secondary:hover {
    transform: translateY(-3px);
}

.hero-visual {
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

/* Floating Clean Cards for Hero */
.hero-carousel-container {
    position: relative;
    width: 600px;
    /* Much Bigger Width */
    height: 400px;
    /* Fixed Height */
    perspective: 1000px;
    margin: 0 auto;
    /* Center in visual area */
}

.hero-card {
    background: transparent;
    backdrop-filter: none;
    border-radius: 30px;
    padding: 0;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;

    /* Horizontal Slide Setup */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);

    /* Default: Waiting on Right */
    transform: translateX(80%) scale(0.8);
    opacity: 0.5;
    z-index: 1;
    overflow: hidden;
}

.hero-card.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.hero-card.prev {
    opacity: 0.5;
    transform: translateX(-80%) scale(0.8);
    z-index: 5;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    margin: 0;
    display: block;
}

/* Categories Section */
.categories-section {
    padding: 60px 5%;
    position: relative;
    background: radial-gradient(circle at top right, rgba(138, 43, 226, 0.05), transparent 40%);
    /* Subtle tint */
}

.section-title {
    text-align: center;
    font-family: 'Great Vibes', cursive;
    font-size: 56px;
    color: var(--text-color);
    /* Dynamic Color */
    font-weight: 400;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4b6cb7, transparent);
    border-radius: 2px;
}

.categories-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px;
    /* Spacing before search */
}

.category-card {
    background: var(--card-bg);
    /* Dynamic BG */
    border-radius: 25px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: var(--shadow);
    /* Dynamic Shadow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border for dark mode */
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s;
    transform-origin: left;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(75, 108, 183, 0.15);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 36px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s;
}

.category-card:hover .category-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Enhanced Search Bar */
.search-filter {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.search-bar input {
    /* Reset from inline style */
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 16px;
    color: #333;
}

.search-bar select {
    border: none !important;
    background: #f0f2f5 !important;
    border-radius: 30px !important;
    font-weight: 600;
    color: #555;
    padding: 10px 20px !important;
}

.category-name {
    font-weight: 600;
    color: #333;
}

/* Featured Products & Grid */
.products-section {
    padding: 0 5% 100px;
    max-width: 1300px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f2f5;
}

.product-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card-image-wrapper {
    position: relative;
    height: 240px;
    background: #f8f9fa;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card-modern:hover img {
    transform: scale(1.08);
    /* Subtle zoom */
}

.card-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s 0.1s;
}

.product-card-modern:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.action-btn:hover {
    background: #4b6cb7;
    color: white;
    transform: scale(1.1);
}

.action-btn.active {
    color: #ff4757;
}

.card-info {
    padding: 20px;
}

.card-category {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #182848;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-price {
    font-size: 18px;
    font-weight: 800;
    color: #4b6cb7;
}

.btn-add-minimal {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f0f2f5;
    color: #182848;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-minimal:hover {
    background: #182848;
    color: white;
    transform: rotate(90deg);
}

/* Dark Mode Specific Fixes */
[data-theme="dark"] .product-card-modern {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .card-title {
    color: var(--text-color) !important;
}

[data-theme="dark"] .card-price {
    color: var(--primary-color);
}

[data-theme="dark"] .category-card:hover {
    background: rgba(255, 255, 255, 0.1);
    /* Darker hover */
    transform: translateY(-5px);
}

/* Fix Dropdown Options being bright */
[data-theme="dark"] option {
    background-color: #050510;
    /* Dark background for options */
    color: white;
}

/* Ensure Bottom Sections use variables */
[data-theme="dark"] .newsletter,
[data-theme="dark"] footer,
[data-theme="dark"] .categories-section,
[data-theme="dark"] .products-section {
    background: transparent !important;
    /* Allow body gradient to show */
    color: var(--text-color) !important;
    border-top: none;
}

.newsletter p {
    margin-bottom: 30px;
    opacity: 0.9;
    font-size: 18px;
}

.newsletter form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.newsletter input {
    padding: 15px 25px;
    border-radius: 50px;
    border: none;
    flex: 1;
    font-size: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-subscribe {
    background: #ffd700;
    color: #333;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-subscribe:hover {
    transform: scale(1.05);
    background: #ffea00;
}

/* --- Contact Section --- */
.contact-section {
    padding: 80px 20px 100px;
    /* Extra bottom padding for scroll */
    text-align: center;
    background: transparent;
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
}

.contact-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .contact-card {
    background: rgba(20, 10, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #8e44ad);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.contact-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.contact-card p {
    margin-bottom: 5px;
    font-size: 16px;
}

.contact-card a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
    font-weight: 500;
}

.contact-card a:hover {
    color: #e91e63;
    text-decoration: underline;
}

/* Mobile Fix for Contact Grid */
@media (max-width: 768px) {
    .contact-section {
        padding: 50px 10px 80px;
        /* Less horizontal padding */
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Columns */
        gap: 10px;
        /* Tighter gap */
    }

    .contact-card {
        padding: 15px 10px;
        /* Smaller padding */
    }

    .icon-box {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .contact-card h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .contact-card p,
    .contact-card a {
        font-size: 12px;
    }
}