:root {
    --primary: #E8571A;
    --primary-hover: #d14a14;
    --secondary: #8B2500;
    --bg: #FFF8F5;
    --card-bg: #FFFFFF;
    --text-dark: #2D1A0E;
    --text-medium: #8B6F5E;
    --border: #F0D5C8;
    --success: #4CAF50;
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(232, 87, 26, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    font-weight: 700;
}

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

/* Header */
.top-bar {
    background-color: var(--secondary);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

.main-header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 15px;
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

/* Mega Menu */
.mega-dropdown {
    position: static !important;
}

.mega-menu {
    width: 100%;
    left: 0;
    right: 0;
    padding: 30px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: var(--white);
    display: none;
    position: absolute;
    top: 100%;
}

.nav-item:hover .mega-menu {
    display: block;
}

/* Icons */
.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.icon-btn {
    font-size: 1.2rem;
    position: relative;
    cursor: pointer;
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 50%;
}

/* Search Bar */
#search-form-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: none;
    z-index: 999;
}

#search-form-container.active {
    display: block;
}

#search-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

#search-input {
    flex: 1;
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 30px;
    outline: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #FFF8F5 0%, #FFE5D9 100%);
    padding: 100px 0;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 40px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
}

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

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    background: transparent;
}

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

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
}

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

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--text-medium);
    z-index: 10;
    border: none;
    outline: none;
}

.wishlist-btn.active {
    color: #e74c3c;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.old-price {
    text-decoration: line-through;
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-right: 10px;
}

/* Toast System */
.toast-msg {
    background: var(--white);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    border-left: 5px solid var(--primary);
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: #e74c3c; }

.animate-slide-in {
    animation: slideIn 0.4s ease forwards;
}

.animate-slide-out {
    animation: slideOut 0.4s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Live Search */
#live-search-results {
    max-height: 400px;
    overflow-y: auto;
    position: absolute;
    width: 100%;
    left: 0;
    z-index: 1001;
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 80px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-logo {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 30px;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-content h1 { font-size: 2.5rem; }
    .shop-sidebar { display: none; }
    .main-content { margin-left: 0; padding: 20px; }
    .sidebar { width: 0; display: none; } /* Simplified for now */
}

@media (max-width: 768px) {
    .hero-section { padding: 60px 0; }
    .card-body { padding: 20px; }
    .footer-categories { justify-content: center !important; }
    .footer { text-align: center; }
    .social-icons { justify-content: center; }
}

@media (max-width: 576px) {
    .nav-link { margin: 0 5px; font-size: 0.9rem; }
    .btn-lg { padding: 10px 20px; font-size: 1rem; }
}

/* Security & Utility */
.tiny { font-size: 0.7rem; }
.transition-hover { transition: var(--transition); }
.transition-hover:hover { transform: translateY(-5px); }
.shadow-sm { box-shadow: 0 2px 10px rgba(0,0,0,0.03) !important; }
.rounded-4 { border-radius: 1.5rem !important; }

/* Product Grid Responsiveness */
.row-cols-xs-1 > * { flex: 0 0 auto; width: 100%; }
.row-cols-xs-2 > * { flex: 0 0 auto; width: 50%; }

/* Modern Category Card */
.category-card-modern {
    height: 250px;
    transition: var(--transition);
}

.category-card-modern img {
    transition: var(--transition);
}

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

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(45, 26, 14, 0.9));
    transition: var(--transition);
}

.category-card-modern:hover .category-overlay {
    background: linear-gradient(transparent, rgba(232, 87, 26, 0.9));
}

/* Product Card */
.product-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, 
                box-shadow 0.3s ease;
    position: relative;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(232,87,26,0.15);
}

/* Image Wrapper */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #FFF8F5;
}

/* Product Image */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

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

/* Badge Styles */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.badge-new,
.badge-featured {
    background: #E8571A;
    color: white;
}

.badge-best-seller {
    background: #E8571A;
    color: white;
}

.badge-sale {
    background: #E8571A;
    color: white;
}

.badge-eco-friendly {
    background: #4CAF50;
    color: white;
}

.badge-popular {
    background: #E8571A;
    color: white;
}

.badge-premium {
    background: #8B2500;
    color: white;
}

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 2;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    background: #E8571A;
    color: white;
}

.wishlist-btn.active i {
    font-weight: 900;
}

/* Product Info */
.product-info {
    padding: 15px;
}

.category-label {
    color: #E8571A;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2D1A0E;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.regular-price,
.sale-price {
    color: #2D1A0E;
    font-weight: 700;
    font-size: 1rem;
}

.original-price del {
    color: #8B6F5E;
    font-size: 0.85rem;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E8571A;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #8B2500;
    transform: scale(1.1);
}

/* Responsive Images */
@media (max-width: 768px) {
    .product-name {
        font-size: 0.85rem;
    }
    .product-info {
        padding: 10px;
    }
}

.product-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #FFF8F5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.product-img-placeholder span {
    font-size: 3rem;
}

.product-img-placeholder p {
    font-size: 0.8rem;
    color: #8B6F5E;
    text-align: center;
    padding: 0 10px;
}
