/* ============================================
   FRONTEND COMPONENTS STYLESHEET
   ============================================
   This file contains all custom frontend component styles
   including sidebars, cards, buttons, and other UI elements.
   
   Color Scheme:
   - Primary: #caba92
   - Secondary: #b5b0ab
   - Dark: #8b7355
   
   Last Updated: 2024
   ============================================ */

/* ============================================
   GLOBAL CSS VARIABLES
   ============================================ */

   :root {
    --primary: #caba92;
    --secondary: #b5b0ab;
    --primary-dark: #8b7355;
    --primary-light: #d4c4a8;
    --secondary-light: #c5c0bb;
    --text-primary: #495057;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    --bg-primary: #f8f9fa;
    --bg-secondary: #e9ecef;
    --bg-glass: rgba(255, 255, 255, 0.6);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-primary: rgba(202, 186, 146, 0.3);
    --shadow-primary-hover: rgba(202, 186, 146, 0.4);
}

/* ============================================
   CATEGORY SIDEBAR COMPONENT
   ============================================ */

.modern-sidebar {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 
        0 20px 40px var(--shadow-light),
        0 8px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.modern-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px var(--shadow-medium),
        0 12px 24px var(--shadow-light),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sidebar-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-dark) 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

.sidebar-header h3 {
    margin: 0;
    color: var(--text-light);
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.category-list {
    padding: 0;
    margin: 0;
    list-style: none;
    background: var(--bg-glass);
}

.category-item {
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.category-item:hover::before {
    width: 4px;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    z-index: 1;
    letter-spacing: 0.3px;
}

.category-link:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text-light);
    transform: translateX(8px) scale(1.02);
    box-shadow: 
        0 8px 25px var(--shadow-primary-hover),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text-light);
    box-shadow: 
        inset 4px 0 0 var(--primary-dark),
        0 4px 15px var(--shadow-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-dark);
    box-shadow: 0 0 10px rgba(139, 115, 85, 0.5);
}

.category-arrow {
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    color: var(--text-secondary);
}

.category-link:hover .category-arrow {
    transform: rotate(90deg) scale(1.1);
    opacity: 1;
    color: var(--text-light);
}

.subcategory-list {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, var(--bg-primary) 100%);
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid var(--shadow-primary);
}

.subcategory-list.show {
    max-height: 500px;
    padding: 0.75rem 0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.subcategory-item {
    margin: 0;
    position: relative;
}

.subcategory-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.subcategory-item:hover::before {
    width: 3px;
}

.subcategory-link {
    display: block;
    padding: 1rem 1.5rem 1rem 3.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 3px solid transparent;
    letter-spacing: 0.2px;
}

.subcategory-link:hover {
    background: linear-gradient(135deg, var(--shadow-primary) 0%, rgba(181, 176, 171, 0.1) 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 4rem;
    transform: translateX(5px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.subcategory-link.active {
    background: linear-gradient(135deg, var(--shadow-primary) 0%, rgba(181, 176, 171, 0.2) 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.subcategory-link.active::before {
    content: '●';
    position: absolute;
    left: 2.5rem;
    color: var(--primary);
    font-size: 0.7rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.all-categories-link {
    display: flex;
    align-items: center;
    padding: 1.5rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.all-categories-link:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text-light);
    transform: translateX(8px) scale(1.02);
    box-shadow: 
        0 8px 25px var(--shadow-primary-hover),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.all-categories-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text-light);
    box-shadow: 
        inset 4px 0 0 var(--primary-dark),
        0 4px 15px var(--shadow-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.all-categories-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-dark);
    box-shadow: 0 0 10px rgba(139, 115, 85, 0.5);
}

.category-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-link:hover .category-icon,
.all-categories-link:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
}

/* ============================================
   END OF CATEGORY SIDEBAR COMPONENT
   ============================================ */

/* ============================================
   BREADCRUMB COMPONENT
   ============================================ */

.custom-breadcrumb {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--primary);
}

.custom-breadcrumb .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.custom-breadcrumb .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.custom-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary);
}

.custom-breadcrumb .breadcrumb-item.active .bredcrumblastitem {
    color: var(--primary);
    font-weight: 600;
}

.custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #adb5bd;
    margin: 0 0.5rem;
    font-size: 1rem;
}

/* ============================================
   ATTRACTIVE PRODUCT CARDS COMPONENT
   ============================================ */

.product-grid {
    padding: 1rem;
    padding-top: 0rem;
}

.product-grid .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.product-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(202, 186, 146, 0.05) 0%, rgba(181, 176, 171, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.product-image-container {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
    flex-shrink: 0;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quick-view-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(202, 186, 146, 0.4);
}

.product-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    pointer-events: none;
}

.rating-badge {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.rating-badge i {
    color: #ffc107;
}

.product-details {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    text-align: left;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.product-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0 0 0.75rem 0;
}

.product-rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 1rem;
}

.product-rating-stars i {
    font-size: 0.9rem;
    color: #ffc107;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.product-rating-stars i.far {
    color: #e5e7eb;
}

.product-footer {
    margin-top: auto;
    padding-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-section {
    display: none;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.add-to-cart-btn {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.5s ease;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-primary-hover);
}

.no-products {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.no-products .icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.no-products h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.no-products p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   COMPACT CATEGORY SIDEBAR STYLES
   ============================================ */

.compact-category-sidebar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: sticky;
    top: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.category-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-header h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header i {
    font-size: 0.9rem;
}

.category-list {
    padding: 0.5rem 0;
}

.category-group {
    margin-bottom: 0.25rem;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-item:hover {
    background: rgba(202, 186, 146, 0.1);
    color: var(--primary);
    text-decoration: none;
    border-left-color: var(--primary);
}

.category-item.active {
    background: rgba(202, 186, 146, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.category-item i {
    font-size: 0.8rem;
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
    color: var(--primary);
}

.category-item span {
    flex: 1;
}

.category-item .arrow {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
    margin-left: auto;
}

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

.subcategory-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(248, 250, 252, 0.5);
    margin: 0 0.5rem;
    border-radius: 0 0 8px 8px;
}

.subcategory-dropdown.show {
    max-height: 300px;
}

.subcategory-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem 0.5rem 2rem;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    border-left: 2px solid transparent;
    margin-left: 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.subcategory-item:hover {
    background: rgba(202, 186, 146, 0.08);
    color: var(--primary);
    text-decoration: none;
    border-left-color: var(--primary);
}

.subcategory-item.active {
    background: rgba(202, 186, 146, 0.12);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.subcategory-item i {
    font-size: 0.7rem;
    margin-right: 0.5rem;
    width: 12px;
    text-align: center;
    color: #9ca3af;
}

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

.subcategory-item span {
    flex: 1;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .compact-category-sidebar {
        margin-bottom: 20px;
        border-radius: 10px;
        position: relative;
        top: 0;
        max-height: 60vh;
    }
    
    .category-header {
        padding: 0.75rem;
    }
    
    .category-header h4 {
        font-size: 0.9rem;
    }
    
    .category-item {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .category-item i {
        font-size: 0.75rem;
        margin-right: 0.5rem;
        width: 14px;
    }
    
    .subcategory-item {
        padding: 0.4rem 0.75rem 0.4rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .subcategory-item i {
        font-size: 0.65rem;
        margin-right: 0.4rem;
        width: 10px;
    }
}

@media (max-width: 576px) {
    .modern-sidebar {
        border-radius: 12px;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .category-link,
    .all-categories-link {
        padding: 0.875rem;
    }
    
    .subcategory-link {
        padding: 0.625rem 0.875rem 0.625rem 2.25rem;
    }
    
    .custom-breadcrumb {
        padding: 0.75rem 1rem;
        margin-top: 15px;
    }
    
    .product-grid .grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.25rem;
    }
    
    .product-card {
        border-radius: 14px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-details {
        padding: 1.25rem;
    }
    
    .product-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 2.8rem;
        margin-bottom: 0.625rem;
    }
    
    .current-price {
        font-size: 1.2rem;
    }
    
    .add-to-cart-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .quick-view-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}
