/* Enhanced sidebar styles with 3D hover effects and subcategory support */

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

:root {
    --sidebar-bg: #242836;
    --sidebar-hover: #2e3446;
    --sidebar-active: #1e90ff;
    --sidebar-width: 320px;
    --toggle-size: 20px;
}


.site-title {
    margin-right: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #db1414, #e6e6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-container {
    position: relative;
}

/* Fixed toggle button that's always visible */
#toggle-sidebar {
    position: fixed;
    top: 90px;
    left: 10px;
    width: 50px;
    height: 50px;
    background: #1e90ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(30, 144, 255, 0.6);
    z-index: 1001;
    font-size: 22px;
    font-weight: bold;
    color: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.8);
    animation: pulseButton 2s infinite alternate;
    transform-style: preserve-3d;
    perspective: 1000px;
}

#toggle-sidebar:hover {
    transform: translateZ(5px) rotateX(5deg) rotateY(5deg) scale(1.05);
    box-shadow:
        0 0 25px rgba(30, 144, 255, 1),
        0 0 10px rgba(255, 255, 255, 0.5);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes pulseButton {
    0% {
        box-shadow: 0 0 10px rgba(30, 144, 255, 0.6);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 20px rgba(30, 144, 255, 0.9);
        transform: scale(1.05);
    }
}

#toggle-sidebar:active {
    transform: scale(0.95);
}

.sidebar {
    position: fixed;
    top: 80px;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: calc(100% - 80px);
    background: var(--sidebar-bg);
    box-shadow:
        -10px 0 30px rgba(0, 0, 0, 0),
        20px 0 40px rgba(0, 0, 0, 0);
    transition:
        left 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.5s ease,
        transform 0.3s ease;
    z-index: 1000;
    border-radius: 0 16px 16px 0;
    backdrop-filter: blur(5px);
    overflow-y: auto; /* Changed from hidden to auto for scrolling on mobile */
    overflow-x: hidden;
    transform-origin: left;
    color: rgb(225, 226, 224);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg,
            rgba(30, 144, 255, 0.05) 0%,
            rgba(30, 144, 255, 0) 70%);
    z-index: -1;
}

.sidebar.active {
    left: 0;
    box-shadow:
        5px 0 30px rgba(0, 0, 0, 0.3),
        20px 0 40px rgba(30, 144, 255, 0.15);
    animation: sidebarActivate 0.5s forwards;
}

@keyframes sidebarActivate {
    0% { transform: translateX(0) scaleX(0.95); }
    50% { transform: translateX(10px) scaleX(1.02); }
    100% { transform: translateX(0) scaleX(1); }
}

.sidebar-header {
    padding: 25px 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 1px;
    color: white;
    text-shadow: 0 0 10px rgba(30, 144, 255, 0.5);
    text-align: center;
    background: linear-gradient(to right,
        rgba(30, 144, 255, 0.1) 0%,
        rgba(30, 144, 255, 0.3) 50%,
        rgba(30, 144, 255, 0.1) 100%);
}

.sidebar ul {
    list-style: none;
    padding: 15px 0;
}

/* Main category items */
.sidebar ul li {
    padding: 15px 20px;
    margin: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow submenu to wrap */
    transform: translateX(-20px);
    opacity: 0;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.sidebar ul li .category-name {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 3D hover effect for main categories */
.sidebar ul li:hover {
    background-color: var(--sidebar-hover);
    transform: translateY(-3px) translateZ(5px) rotateX(5deg) rotateY(5deg);
    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.2),
        0 0 10px rgba(30, 144, 255, 0.5);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Caret for categories with subcategories */
.sidebar ul li.has-submenu .category-name::after {
    content: '▶';
    margin-left: auto;
    font-size: 12px;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.sidebar ul li.has-submenu.expanded .category-name::after {
    transform: rotate(90deg);
}

/* Subcategory styles */
.sidebar ul li .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out; /* Smoother transition */
    margin-top: 5px;
    width: 100%;
    opacity: 0;
    list-style: none;
    /* Removed margin-left, padding will handle indentation */
    padding-left: 15px; 
}

.sidebar ul li .sub-menu.show {
    max-height: 500px; /* Adjust as needed */
    opacity: 1;
}

.sidebar ul li .sub-menu li {
    padding: 10px 15px;
    margin: 5px 0;
    font-size: 14px;
    border-radius: 6px;
    opacity: 0;
    transform: translateX(-10px);
    animation: fadeInSubmenu 0.3s forwards;
    animation-delay: calc(0.05s * var(--item-index));
    /* Reset hover effects from parent */
    box-shadow: none;
    text-shadow: none;
    background-color: transparent; 
}

/* Distinct hover for sub-menu items */
.sidebar ul li .sub-menu li:hover {
    background-color: rgba(30,144,255,0.2);
    transform: translateX(5px); /* Simple indent on hover */
    box-shadow: none;
}


@keyframes fadeInSubmenu {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar.active ul li {
    animation: slideInItems 0.5s forwards;
}

.sidebar ul li:nth-child(1) { animation-delay: 0.1s; }
.sidebar ul li:nth-child(2) { animation-delay: 0.2s; }
.sidebar ul li:nth-child(3) { animation-delay: 0.3s; }
.sidebar ul li:nth-child(4) { animation-delay: 0.4s; }
.sidebar ul li:nth-child(5) { animation-delay: 0.5s; }
/* Add more if you have more items */


@keyframes slideInItems {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar ul li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.sidebar ul li:hover::before {
    left: 100%;
}

.sidebar ul li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sidebar-active);
    transition: width 0.3s ease;
}

.sidebar ul li:hover::after {
    width: 100%;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.content {
    padding: 30px;
    transition: all 0.3s ease;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 999;
    display: none;
    transition: all 0.5s ease;
}

.overlay.active {
    display: block;
    animation: fadeOverlay 0.5s forwards;
}

@keyframes fadeOverlay {
    to {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
    }
}

/* Add icons using pseudo-elements */
.li-product::before {
    content: '☕';
    margin-right: 10px;
}

.li-tshirts::before {
    content: '👕';
    margin-right: 10px;
}

.li-stickers::before {
    content: '🏷️';
    margin-right: 10px;
}

/* footer */
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa; 
    color: #343a40;
}

.main-content {
    flex: 1;
    padding: 20px;
}

/* --- Professional Footer General Styling - Glass Design --- */
.pro-footer {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    border-left: none;
    border-right: none;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    color: #333;
    padding: 50px 30px 20px 30px;
    font-size: 0.9em;
    line-height: 1.6;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.pro-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(0, 0, 0, 0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

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

/* --- Newsletter Section - Glass Design --- */
.footer-newsletter {
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.footer-newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    z-index: -1;
    pointer-events: none;
}

.footer-newsletter h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}

.footer-newsletter p {
    color: #555;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #333;
    min-width: 250px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.newsletter-form button {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #333;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.newsletter-form button:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* --- Main Columns Section - Glass Design --- */
.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%);
    z-index: -1;
    pointer-events: none;
}

.footer-column:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.footer-column h5 {
    color: #333;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* --- Logo, Tagline & Social Icons Column - Glass Design --- */
.footer-logo {
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #333, #555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icons a {
    color: #555;
    font-size: 1.3em;
    padding: 10px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    text-decoration: none;
}

.social-icons a:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.footer-address {
    margin-top: 20px;
    font-style: normal;
    color: #666;
    font-size: 0.85em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* --- Account Icon Link - Glass Design --- */
.footer-item-account {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
}

.footer-item-account:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* --- Bottom Section - Glass Design --- */
.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    padding-top: 20px;
    padding: 20px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.8em;
    color: #555;
    position: relative;
    overflow: hidden;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 100%);
    z-index: -1;
    pointer-events: none;
}

.footer-copyright {
    color: #555;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.footer-copyright a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.footer-copyright a:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.payment-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-icons span {
    color: #555;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.payment-icons i {
    font-size: 2em;
    color: #555;
    padding: 8px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.payment-icons i:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE STYLES
   ========================================================================== */

/* --- Tablet and smaller (<= 768px) --- */
@media (max-width: 768px) {
    /* Adjust sidebar for a better mobile experience */
    :root {
        --sidebar-width: 280px; /* Make sidebar slightly narrower on tablets */
    }

    #toggle-sidebar {
        top: 20px; /* Position closer to the top */
        left: 20px;
    }
    
    .sidebar {
        top: 0; /* Full height sidebar */
        height: 100%;
        border-radius: 0; /* Remove rounding for full-height design */
    }

    .main-content, .content {
        padding: 15px; /* Reduce padding on main content */
    }
    
    /* Footer adjustments */
    .pro-footer {
        padding: 40px 20px 20px;
    }

    .footer-main {
        /* Use 2 columns on tablets, stacking to 1 on phones */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .footer-bottom {
        flex-direction: column; /* Stack copyright and payment icons */
        text-align: center;
        gap: 20px;
    }

    .payment-icons {
        justify-content: center;
    }
}

/* --- Phone only (<= 480px) --- */
@media (max-width: 480px) {
    :root {
        /* Use viewport width for a responsive sidebar that doesn't cover the whole screen */
        --sidebar-width: 85vw; 
    }

    #toggle-sidebar {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .sidebar-header {
        font-size: 18px;
    }

    .sidebar ul li {
        margin: 5px 10px;
        padding: 12px 15px;
    }
    
    /* Footer adjustments for small phones */
    .pro-footer {
        padding: 30px 15px 15px;
    }

    .footer-newsletter h4 {
        font-size: 1.3em;
    }
    
    .newsletter-form input[type="email"] {
        min-width: 100%; /* Make input full width */
        width: 100%;
    }
    .newsletter-form button {
        width: 100%; /* Make button full width */
    }
    
    .footer-main {
        grid-template-columns: 1fr; /* Stack all columns */
        text-align: center;
    }

    .social-icons {
        justify-content: center; /* Center the social icons */
    }
    
    .footer-column ul li a:hover {
        transform: translateX(0); /* Disable horizontal shift on centered text */
        background: rgba(255, 255, 255, 0.2);
    }

     .footer-address {
         text-align: center;
     }
}