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

:root {
    /* Color Palette */
    --primary: #ef4444;
    --primary-hover: #dc2626;
    --secondary: #1f2937;
    --accent: #3b82f6;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --header-height: 80px;
}

[data-theme="dark"] {
    --background: #0f172a;
    --surface: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

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

/* Header & Navigation */
header {
    background: var(--surface);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.logo span {
    color: var(--secondary);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    font-family: inherit;
    font-size: 0.95rem;
}

.search-bar .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

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

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}

.action-item i {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.action-item:hover {
    color: var(--primary);
}

.action-item:hover i {
    color: var(--primary);
}

/* Mega Menu Dropdown */
.mega-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sub-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 4px 4px var(--radius) var(--radius);
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1001;
}

[data-theme="dark"] .sub-menu {
    background: rgba(30, 41, 59, 0.95);
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    transition: 0.2s;
}

.sub-menu li a::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: 0.2s;
}

.sub-menu li a:hover {
    background: rgba(var(--primary-rgb, 239, 68, 68), 0.05);
    color: var(--primary);
    padding-left: 1.75rem;
}

.sub-menu li a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.sub-menu li:not(:last-child) {
    border-bottom: 1px solid var(--border);
    border-color: rgba(226, 232, 240, 0.5);
}

/* Hero Section */
.hero {
    padding: 2rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.hero-slider {
    background: var(--surface);
    border-radius: var(--radius);
    height: 400px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.hero-banner {
    background: var(--surface);
    border-radius: var(--radius);
    height: 192.5px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-banner:last-child {
    margin-bottom: 0;
}

/* Category Grid */
.categories {
    padding: 3rem 0;
}

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

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: 0.3s;
    border: 1px solid var(--border);
    cursor: pointer;
}

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

.category-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

/* Product Cards */
.products {
    padding: 3rem 0;
}

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

.product-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: 0.3s;
    position: relative;
}

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

.product-image {
    height: 200px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    height: 3rem;
    overflow: hidden;
}

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

.product-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

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

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: white;
}

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

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}
