/* ===== CSS Variables ===== */
:root {
    --primary: #ff9800;
    --primary-dark: #f57c00;
    --primary-light: #ffb74d;
    --secondary: #2c3e50;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: slideInLeft 0.8s ease-out;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    font-weight: 500;
}

.hero-image {
    position: relative;
    animation: slideInRight 0.8s ease-out;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

/* ===== CTA Buttons ===== */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    color: var(--secondary);
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--primary);
    color: var(--white);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(4px);
}

/* ===== Trust Badges ===== */
.trust-badges {
    background: var(--white);
    padding: 60px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out backwards;
}

.badge-item:nth-child(1) { animation-delay: 0.1s; }
.badge-item:nth-child(2) { animation-delay: 0.2s; }
.badge-item:nth-child(3) { animation-delay: 0.3s; }
.badge-item:nth-child(4) { animation-delay: 0.4s; }

.badge-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.badge-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.badge-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.badge-text p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== Featured Categories ===== */
.featured-categories {
    padding: 80px 0;
    background: var(--bg-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/5;
    transition: var(--transition);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out backwards;
}

.category-card.large {
    grid-row: span 2;
    aspect-ratio: auto;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    color: var(--white);
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 60%);
}

.category-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-overlay h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.category-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.category-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    transition: var(--transition);
}

.category-card:hover .category-link {
    transform: translateX(8px);
}

/* ===== Social Proof Section ===== */
.social-proof {
    padding: 80px 0;
    background: var(--white);
    overflow: hidden;
}

.section-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-dark);
}

.reviews-marquee {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.reviews-track {
    display: flex;
    gap: 24px;
    animation: scroll 30s linear infinite;
}

.reviews-track img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Products Section ===== */
.products-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.more-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.more-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

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

.product-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
    aspect-ratio: 3/4;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Why Choose Us ===== */
.why-choose-us {
    padding: 80px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.cta-button-white {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    color: var(--secondary);
    padding: 18px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.cta-button-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-content {
        gap: 40px;
    }
    
    .category-card.large {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 20px;
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-image img {
        transform: none;
    }
    
    .badge-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Adjust product card text for smaller mobile layout */
    .product-title {
        font-size: 0.875rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .product-info {
        padding: 12px;
    }
}

/* ===== Performance Optimizations ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Product Card Styles ===== */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Better image quality on mobile */
@media (max-width: 768px) {
    .product-image {
        aspect-ratio: 1;
        min-height: 150px;
    }
    
    .product-image img {
        object-fit: contain;
        background: #fff;
        padding: 8px;
    }
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.sale-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view {
    background: var(--white);
    color: var(--text-dark);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transform: translateY(10px);
    transition: var(--transition);
}

.product-card:hover .quick-view {
    transform: translateY(0);
}

.quick-view:hover {
    background: var(--primary);
    color: var(--white);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-title a {
    color: var(--text-dark);
    transition: color 0.2s;
}

.product-title a:hover {
    color: var(--primary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    display: flex;
    gap: 2px;
    color: #ffc107;
    font-size: 14px;
}

.rating-count {
    font-size: 12px;
    color: var(--text-light);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.price-sale {
    color: #e74c3c;
}

.price-regular {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 400;
    margin-left: 8px;
}

.add-to-cart {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* ===== Star Styling ===== */
.star {
    color: #ffc107;
}

.star-empty {
    color: #ddd;
}

.star-half {
    position: relative;
    color: #ddd;
}

.star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #ffc107;
}

/* ===== Enhanced Mobile Product Layout ===== */
@media (max-width: 768px) {
    .product-card {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }
    
    .product-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .product-rating {
        font-size: 0.75rem;
    }
    
    .stars {
        font-size: 12px;
    }
    
    .rating-count {
        font-size: 11px;
    }
    
    .product-price {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .price-regular {
        font-size: 0.85rem;
    }
    
    .add-to-cart {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .sale-tag {
        font-size: 10px;
        padding: 4px 8px;
        top: 8px;
        left: 8px;
    }
    
    .quick-view {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 360px) {
    .products-grid {
        gap: 8px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 0.85rem;
    }
    
    .add-to-cart {
        font-size: 0.8rem;
        padding: 8px;
    }
}
