/* --- Global Modern Styling for Index --- */
:root {
    --glass: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* Hero Section Upgrade */
.hero {
    min-height: 85vh;
    background: linear-gradient(135deg, rgba(81, 59, 91, 0.9) 0%, rgba(45, 52, 54, 0.95) 100%),
        url('https://images.unsplash.com/photo-1450778869180-41d0601e046e?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: white;
    padding: clamp(60px, 10vh, 120px) 0;
    position: relative;
}

.hero-content {
    max-width: 950px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 5;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #ffffff, #dcdde1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideUp 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.hero h1 span {
    color: var(--accent);
    display: block;
    background: linear-gradient(135deg, #a8e6cf, #dcedc1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto 3.5rem;
    opacity: 0.9;
    font-weight: 500;
    line-height: 1.6;
    animation: fadeIn 1.2s ease 0.3s backwards;
}

/* Glass Search Bar */
.hero-search {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px;
    border-radius: 80px;
    border: 1px solid var(--glass-border);
    max-width: 750px;
    margin: 0 auto 3.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s backwards;
}

.search-input-wrapper {
    flex: 1;
}

.search-input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    padding: 0.8rem 1.5rem;
    font-size: 1.25rem;
    color: #1e272e;
    font-weight: 600;
}

.search-input::placeholder {
    color: rgba(30, 39, 46, 0.5);
}

.search-input:focus {
    outline: none;
}

.hero-btn {
    background: var(--primary);
    color: #ffffff !important;
    padding: 1.1rem 3rem;
    border-radius: 60px;
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 24px rgba(81, 59, 91, 0.3);
}

.hero-btn:hover {
    transform: scale(1.04) translateY(-3px);
    background: var(--dark);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Feature Cards Grid */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    max-width: 1300px;
    margin: -100px auto 4rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.feature-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .feature-icon {
    transform: scale(1.25) translateY(-5px);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--primary);
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    font-weight: 500;
}

/* Section Headers */
.section-title-alt {
    text-align: center;
    margin-bottom: 5rem;
    padding: 0 2rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(81, 59, 91, 0.08);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.section-title-alt h2 {
    font-size: 3.2rem;
    font-weight: 900;
    color: #1e272e;
    letter-spacing: -1px;
}

/* Quick List / Product List Fix Item (70x70) */
.product-mini-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.product-mini-item:hover {
    background: #fdfdfd;
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.img-70-fix {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 12px;
    object-fit: cover;
    background: #f8f9fa;
    border: 1px solid #eee;
}

.mini-item-info {
    flex: 1;
}

.mini-item-name {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text);
    line-height: 1.3;
}

.mini-item-price {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

/* Trending Layout Grid */
.trending-grid {
    display: grid;
    grid-template-columns: 2.2fr 1.3fr;
    gap: 4rem;
    margin: 6rem 0;
}

.recent-section {
    padding: 8rem 0;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.main-products-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 991px) {
    .main-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Premium Card Design */
.item-card {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.1);
}

.item-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.item-card:hover .item-image {
    transform: scale(1.1);
}

.item-content {
    padding: 2.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #1e272e;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.item-description {
    font-size: 1rem;
    color: #57606f;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Community Section Upgrade */
.community-section {
    background: linear-gradient(135deg, var(--primary) 0%, #2d3436 100%);
    border-radius: 40px;
    padding: 4.5rem 3.5rem;
    margin: 6rem auto;
    color: white;
    box-shadow: 0 40px 100px rgba(81, 59, 91, 0.25);
    position: relative;
    overflow: hidden;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .trending-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0 100px;
        min-height: auto;
        clip-path: none;
        background-attachment: scroll;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.98);
        padding: 10px;
        gap: 5px;
        margin-bottom: 2rem;
    }

    .search-input {
        padding: 0.7rem 1rem;
        text-align: center;
        font-size: 1rem;
    }

    .hero-btn {
        width: 100%;
        padding: 0.8rem;
        border-radius: 12px;
    }

    .hero-features {
        margin-top: 1rem;
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }

    .feature-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }

    .feature-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .community-section {
        padding: 2.5rem 1.25rem;
        margin: 3rem 1rem;
        border-radius: 24px;
    }

    .section-title-alt h2 {
        font-size: 1.8rem;
    }

    .recent-section {
        padding: 4rem 0;
    }

    .items-grid,
    .main-products-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .item-card {
        border-radius: 20px;
    }

    .item-content {
        padding: 1.5rem;
    }

    .item-title {
        font-size: 1.2rem;
    }

    .item-image-wrapper {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title-alt h2 {
        font-size: 1.6rem;
    }

    .section-label {
        font-size: 0.65rem;
        padding: 0.4rem 1rem;
    }
}