@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Design Tokens - Light Mode */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --danger-color: #ef4444;
    --success-color: #10b981;

    --header-bg: #ffffff;
    --header-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

    --font-main: 'Inter', sans-serif;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Design Tokens - Dark Mode */
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;

    --header-bg: #1e293b;
    --header-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

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

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary-color);
}

/* Navbar */
.navbar {
    background-color: var(--header-bg);
    box-shadow: var(--header-shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
    background: var(--bg-color);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    color: var(--text-color);
    outline: none;
}

.search-bar button {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0 15px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-hover);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

.badge {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -8px;
    right: -12px;
}

/* Promotional Carousel */
.promotional-carousel {
    position: relative;
    width: 100%;
    margin-top: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: var(--card-bg);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 400px;
}

@media(max-width: 768px) {
    .carousel-inner {
        height: 250px;
    }
}

.carousel-item {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-color);
    background: var(--header-bg);
    padding: 30px 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    max-width: 90%;
    margin: 0 auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0.95;
}

.carousel-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: none;
}

.carousel-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-shadow: none;
    color: var(--text-muted);
}

@media(max-width: 768px) {
    .carousel-content {
        padding: 20px;
    }

    .carousel-content h2 {
        font-size: 1.5rem;
    }

    .carousel-content p {
        font-size: 0.9rem;
    }
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carousel-control:hover {
    background: white;
    color: var(--primary-color);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Section */
.section {
    padding: 40px 0;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.card-img-container {
    height: 200px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-brand {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-rating {
    margin-bottom: 10px;
    color: #f59e0b;
    font-size: 0.9rem;
}

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

/* Footer */
footer {
    background: var(--header-bg);
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Loader */
.loader {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: #ef4444;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: var(--header-shadow);
    z-index: 1000;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.show {
    display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-bar {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
        margin: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
}