/*
 * E-commerce Shop Bootstrap Theme
 * Complete e-commerce theme with product catalogs and shopping features
 * Built for Bootstrap 5.3
 * License: Free for personal and commercial use
 */

:root {
    --es-primary: #1f2937;
    --es-secondary: #f59e0b;
    --es-accent: #10b981;
    --es-danger: #ef4444;
    --es-warning: #f59e0b;
    --es-info: #3b82f6;
    --es-light: #f9fafb;
    --es-dark: #111827;
    --es-gray-50: #f9fafb;
    --es-gray-100: #f3f4f6;
    --es-gray-200: #e5e7eb;
    --es-gray-300: #d1d5db;
    --es-gray-400: #9ca3af;
    --es-gray-500: #6b7280;
    --es-gray-600: #4b5563;
    --es-gray-700: #374151;
    --es-gray-800: #1f2937;
    --es-gray-900: #111827;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--es-gray-800);
    line-height: 1.6;
}

.text-primary { color: var(--es-primary) !important; }
.text-secondary { color: var(--es-secondary) !important; }
.text-accent { color: var(--es-accent) !important; }
.text-danger { color: var(--es-danger) !important; }

.bg-primary { background-color: var(--es-primary) !important; }
.bg-secondary { background-color: var(--es-secondary) !important; }
.bg-accent { background-color: var(--es-accent) !important; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--es-gray-900);
    line-height: 1.25;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 800;
}

/* Header */
.header-shop {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--es-gray-900);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.top-bar a {
    color: white;
    text-decoration: none;
}

.top-bar a:hover {
    color: var(--es-secondary);
}

.navbar-shop {
    padding: 1rem 0;
}

.navbar-brand-shop {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--es-primary);
    text-decoration: none;
}

.navbar-brand-shop:hover {
    color: var(--es-secondary);
    text-decoration: none;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid var(--es-gray-200);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--es-secondary);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--es-secondary);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.action-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--es-gray-600);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: var(--es-secondary);
    background-color: var(--es-gray-100);
}

.action-btn .badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--es-danger);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    min-width: 1.25rem;
    text-align: center;
}

/* Navigation Menu */
.main-nav {
    background-color: var(--es-gray-50);
    border-top: 1px solid var(--es-gray-200);
    border-bottom: 1px solid var(--es-gray-200);
    padding: 0.75rem 0;
}

.nav-categories {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-categories a {
    color: var(--es-gray-700);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.nav-categories a:hover,
.nav-categories a.active {
    color: var(--es-secondary);
    background-color: white;
}

/* Hero Section */
.hero-shop {
    background: linear-gradient(135deg, var(--es-primary) 0%, var(--es-gray-700) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-shop h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
}

.hero-shop .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn-shop {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-shop {
    background-color: var(--es-secondary);
    color: white;
}

.btn-primary-shop:hover {
    background-color: #d97706;
    transform: translateY(-2px);
}

.btn-outline-shop {
    background: transparent;
    color: var(--es-secondary);
    border: 2px solid var(--es-secondary);
}

.btn-outline-shop:hover {
    background-color: var(--es-secondary);
    color: white;
}

.btn-success-shop {
    background-color: var(--es-accent);
    color: white;
}

.btn-success-shop:hover {
    background-color: #059669;
}

/* Product Grid */
.products-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--es-gray-900);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--es-gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid var(--es-gray-200);
    color: var(--es-gray-600);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
    border-color: var(--es-secondary);
    color: var(--es-secondary);
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--es-gray-200);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: var(--es-danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.sale {
    background-color: var(--es-danger);
}

.product-badge.new {
    background-color: var(--es-accent);
}

.product-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.action-icon {
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-icon:hover {
    background-color: var(--es-secondary);
    color: white;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    color: var(--es-gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--es-gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--es-secondary);
}

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

.stars {
    display: flex;
    color: #fbbf24;
}

.rating-text {
    color: var(--es-gray-500);
    font-size: 0.875rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--es-gray-900);
}

.original-price {
    font-size: 1rem;
    color: var(--es-gray-500);
    text-decoration: line-through;
}

.discount {
    background-color: var(--es-danger);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.add-to-cart {
    background-color: var(--es-secondary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: auto;
}

.add-to-cart:hover {
    background-color: #d97706;
    transform: translateY(-1px);
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background-color: var(--es-gray-50);
}

.category-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--es-secondary), #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--es-gray-900);
}

.category-count {
    color: var(--es-gray-500);
    font-size: 0.875rem;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--es-primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.newsletter-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: none;
}

.newsletter-btn {
    background-color: var(--es-secondary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.newsletter-btn:hover {
    background-color: #d97706;
}

/* Footer */
.footer-shop {
    background-color: var(--es-gray-900);
    color: var(--es-gray-300);
    padding: 4rem 0 2rem;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--es-gray-300);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--es-secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--es-gray-800);
    color: var(--es-gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--es-secondary);
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--es-gray-700);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--es-gray-400);
}

/* Shopping Cart */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1050;
    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(--es-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--es-gray-500);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--es-gray-200);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.cart-item-price {
    color: var(--es-gray-600);
    font-size: 0.875rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--es-gray-200);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    background-color: var(--es-accent);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.checkout-btn:hover {
    background-color: #059669;
}

/* Bootstrap Icons Support */
.search-btn i,
.action-btn i,
.action-icon i,
.social-link i {
    font-size: inherit;
    line-height: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-bar {
        display: none;
    }
    
    .navbar-actions {
        gap: 0.5rem;
    }
    
    .nav-categories {
        gap: 1rem;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .hero-shop h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }
}

@media (max-width: 576px) {
    .hero-shop {
        padding: 2rem 0;
    }
    
    .hero-shop h1 {
        font-size: 1.75rem;
    }
    
    .products-section,
    .categories-section {
        padding: 2rem 0;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
}