/* =========================================================================
   Aura E-Commerce | Modern UI/UX Styles
   ========================================================================= */

/* --- CSS Variables & Theme (Light/Dark Mode) --- */
:root {
    /* Colors - Light Mode */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #fbbf24;
    --border-color: #e2e8f0;
    --danger-color: #ef4444;
    --overlay-color: rgba(0, 0, 0, 0.5);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-size-base: 16px;
    --fw-light: 300;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Spacing & Layout */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    /* Z-Index variables */
    --z-header: 100;
    --z-overlay: 1000;
    --z-sidebar: 1010;
}

body.dark-mode {
    /* Colors - Dark Mode */
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3);
    --overlay-color: rgba(0, 0, 0, 0.7);
}

/* --- Reset & Base Styles (Mobile First) --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    color: var(--text-color);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-xl);
    font-weight: var(--fw-semibold);
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-link {
    color: var(--primary-color);
    font-weight: var(--fw-medium);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-link:hover {
    color: var(--primary-hover);
    gap: 0.5rem;
}

/* --- Header & Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(var(--surface-color), 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-header);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.logo i {
    color: var(--primary-color);
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--surface-color);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-sidebar);
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
}

.nav-menu.show-menu {
    right: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-link {
    font-weight: var(--fw-medium);
    font-size: 1.125rem;
    color: var(--text-color);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.nav-close:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-actions button, .nav-actions div {
    font-size: 1.25rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.nav-actions button:hover, .nav-actions div:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Cart Sidebar --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--surface-color);
    z-index: var(--z-sidebar);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.cart-sidebar.show {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.close-cart {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}
.cart-items::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
    font-style: italic;
}

/* Cart Item details styling */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 30px;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item img {
    width: 100%;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    aspect-ratio: 1;
}

.item-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.item-price {
    color: var(--primary-color);
    font-weight: var(--fw-semibold);
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    width: max-content;
}

.qty-btn {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--border-color);
}

.item-quantity {
    font-size: 0.875rem;
    font-weight: var(--fw-medium);
    width: 20px;
    text-align: center;
}

.remove-btn {
    color: var(--danger-color);
    transition: var(--transition);
}

.remove-btn:hover {
    transform: scale(1.1);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: var(--fw-bold);
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
}

.checkout-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* --- Hero Section --- */
.hero {
    padding-top: calc(70px + 2rem);
    padding-bottom: 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    text-align: center;
}

.subtitle {
    color: var(--primary-color);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: inline-block;
}

.title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-image {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.hero-image img {
    border-radius: var(--border-radius-xl);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-xl);
}

.blob-shape {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(59,130,246,0.3) 0%, rgba(147,197,253,0.1) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: 1;
    animation: morph 8s ease-in-out infinite both alternate;
}

@keyframes morph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}


/* --- Categories Section --- */
.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.category-card {
    position: relative;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    height: 250px;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.1));
}

.category-info {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 3;
    color: #ffffff;
}

.category-info h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.category-card:hover .btn-link {
    color: var(--secondary-color);
}


/* --- Products Section --- */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius-xl);
    color: var(--text-color);
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: var(--fw-medium);
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

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

.product-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    transition: bottom 0.3s ease;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.product-title {
    font-size: 1.1rem;
    font-weight: var(--fw-semibold);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 2px;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    color: var(--primary-color);
}

.add-cart-btn {
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: var(--fw-medium);
    transition: var(--transition);
}

.add-cart-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}


/* --- Promo Section --- */
.promo {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(59,130,246,0.8) 100%), url('https://images.unsplash.com/photo-1555529669-e69e7aa0ba9a?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    padding: 5rem 0;
    text-align: center;
    color: #ffffff;
    background-blend-mode: multiply;
}

.promo-content h2 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.promo-content h3 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.promo-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}


/* --- Newsletter --- */
.newsletter-container {
    background-color: var(--surface-color);
    border-radius: var(--border-radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.newsletter-content h2 {
    margin-bottom: 1rem;
}

.newsletter-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.newsletter-form input:focus {
    border-color: var(--primary-color);
}


/* --- Footer --- */
.footer {
    background-color: var(--surface-color);
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-muted);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* --- Media Queries --- */

/* For Tablets (min-width: 768px) */
@media screen and (min-width: 768px) {
    .container {
        max-width: 720px;
    }

    .hero-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .hero-content {
        text-align: left;
    }

    .title {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: row;
    }
    
    .blob-shape {
        width: 350px;
        height: 350px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-card {
        height: 300px;
    }

    .newsletter-form {
        flex-direction: row;
    }

    .newsletter-form input {
        flex: 1;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* For Deskptops (min-width: 1024px) */
@media screen and (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }

    .nav-toggle, .nav-close {
        display: none;
    }

    .nav-menu {
        position: relative;
        right: 0;
        width: auto;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
    }

    .nav-list {
        flex-direction: row;
        gap: 2.5rem;
    }

    .title {
        font-size: 4rem;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* For Large Deskptops (min-width: 1280px) */
@media screen and (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}
