/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    --accent-light: #f8f9fa;
    --accent-gray: #e9ecef;
    --border-color: #dee2e6;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Loader --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--accent-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Navbar --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--accent-gray);
    padding: 0.8rem 0;
    transition: var(--transition);
}

.navbar-brand-img {
    height: 40px;
    width: 40px;
    object-fit: cover;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 0.5rem;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--text-light) !important;
}

.cart-icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 0.5rem;
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Navbar Offcanvas (Mobile Menu) */
.navbar-offcanvas {
    width: 75% !important;
    /* Mobile sidebar width */
    max-width: 300px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 500px;
    background: url('https://images.unsplash.com/photo-1542838132-92c53300491e?q=80&w=2574&auto=format&fit=crop') no-repeat center center/cover;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 700px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.7s;
}

.btn-custom {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--secondary-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.9s;
}

.btn-custom:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background-color: transparent;
    color: var(--primary-color);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Categories --- */
.category-card {
    background-color: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--accent-gray);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.category-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.category-card:hover .category-img {
    transform: scale(1.1);
}

.category-card.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-card.active .category-img {
    filter: brightness(0) invert(1);
}

/* --- Products --- */
.product-card {
    border: none;
    background: white;
    transition: var(--transition);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: var(--accent-light);
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-details {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: block;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-add-cart {
    width: 100%;
    margin-top: 1rem;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.social-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    margin-right: 1rem;
    transition: var(--transition);
}

.social-icon:hover {
    color: white;
}

/* --- Offcanvas Cart --- */
.offcanvas {
    border-left: none;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--accent-gray);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
}

.cart-item-details {
    flex-grow: 1;
}

.qty-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qty-btn:hover {
    background-color: var(--accent-light);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}