/* ============================================
   JIMIS STORE - COMPONENTS STYLES
   ============================================ */

/* Header & Navigation */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.logo-text .highlight {
    color: var(--primary-color);
}

/* Desktop Navigation */
.main-nav {
    flex: 1;
    margin-left: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    padding: 0.5rem 1rem;
    display: block;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    position: relative;
    transition: var(--transition);
}

.header-actions button:hover {
    color: var(--primary-color);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--accent-color);
}

/* Mobile Menu Overlay (dark background) */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    display: block !important;
}

/* Mobile Menu Panel (slide-out menu) */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.mobile-menu-panel.open {
    left: 0 !important;
}

/* Mobile Menu Header */
.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
}

.mobile-menu-header h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}

.close-mobile-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
    padding: 8px;
}

.close-mobile-menu:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Mobile Navigation Links */
.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-links li:last-child {
    border-bottom: none;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: var(--accent-color);
    color: var(--primary-color);
    padding-left: 2rem;
}

.mobile-nav-links i {
    width: 24px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.3rem;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--primary-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
}

.empty-cart i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: var(--text-light);
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-info p {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-item-quantity button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.cart-item-quantity button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.remove-item {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: var(--transition);
}

.remove-item:hover {
    color: #f44336;
}

/* Cart Footer */
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--accent-color);
    background: var(--white);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Footer */
.main-footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
}

.contact-info i {
    width: 20px;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Newsletter Section */
.newsletter-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-family: inherit;
}

.newsletter-form input:focus {
    outline: none;
}

.newsletter-form button {
    padding: 12px 30px;
    white-space: nowrap;
}

/* Delivery Info */
.delivery-info {
    background: #fff3e0;
    padding: 12px;
    border-radius: var(--border-radius);
    margin-top: 12px;
    font-size: 0.85rem;
}

.delivery-info i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Hide desktop navigation */
    .main-nav {
        display: none;
    }
    
    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* Adjust header actions spacing */
    .header-actions {
        gap: 0.8rem;
    }
    
    /* Full width cart on mobile */
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    /* Footer stack on mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    /* Newsletter form on mobile */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Smaller screens */
    .mobile-menu-panel {
        width: 85%;
        left: -85%;
    }
    
    .cart-header h3 {
        font-size: 1.1rem;
    }
    
    .cart-item-img {
        width: 60px;
        height: 60px;
    }
}

/* Animation for menu open */
@keyframes slideIn {
    from {
        left: -280px;
    }
    to {
        left: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mobile-menu-panel.open {
    animation: slideIn 0.3s ease forwards;
}

.mobile-menu-overlay.active {
    animation: fadeIn 0.3s ease forwards;
}

/* Scrollbar styling for mobile menu */
.mobile-menu-panel::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-menu-panel::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Active link highlight */
.mobile-nav-links a.active {
    background: var(--accent-color);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

