/* TAONSA Electronics Store - Custom Styles */

/* Custom Font Configuration */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Custom Colors and Variables */
:root {
    --primary-color: #0d9488;
    --primary-dark: #0f766e;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --transition: all 0.3s ease;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

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

/* Header Enhancements */
.header-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Logo Animation */
.logo-container img {
    transition: var(--transition);
}

.logo-container:hover img {
    transform: scale(1.05);
}

/* Search Bar Enhancements */
.search-container {
    position: relative;
}

.search-container input:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    border-color: var(--primary-color);
}

/* Navigation Dropdown Improvements */
.nav-dropdown {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

.nav-dropdown a {
    transition: var(--transition);
    border-radius: 8px;
    margin: 4px 8px;
}

.nav-dropdown a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 20px;
}

/* Hero Section Gradient Animation */
.hero-gradient {
    background: linear-gradient(-45deg, #0d9488, #06b6d4, #8b5cf6, #f59e0b);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Category Cards Hover Effects */
.category-card {
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(13, 148, 136, 0.15);
}

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

.category-card:hover i {
    transform: scale(1.2);
    color: var(--primary-dark) !important;
}

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

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

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

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.product-card:hover .product-title {
    color: var(--primary-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 4px;
}

.product-rating .stars {
    color: var(--accent-color);
}

.product-rating .rating-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 8px;
}

.add-to-cart-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Sale Badge */
.sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--error-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

/* Filter Sidebar Styling */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    border-radius: 6px;
}

.filter-option:hover {
    background-color: var(--bg-light);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    margin-right: 12px;
    accent-color: var(--primary-color);
    transform: scale(1.2);
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    background: white;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.cart-item:hover {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 12px;
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qty-btn {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.qty-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.remove-item:hover {
    background-color: var(--error-color);
    color: white;
}

/* Cart Total Section */
.cart-total-section {
    border-top: 2px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Checkout Button */
.checkout-btn {
    width: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 16px;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(400px);
    transition: var(--transition);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background-color: var(--error-color);
}

/* Footer Enhancements */
footer {
    background: linear-gradient(135deg, #1f2937, #374151);
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

/* Social Media Icons */
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-4px);
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .hero-gradient h2 {
        font-size: 2.5rem;
    }
    
    .category-card {
        padding: 16px;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .cart-sidebar {
        width: 100% !important;
        max-width: 400px;
    }
    
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    .hero-gradient {
        padding: 40px 0;
    }
    
    .hero-gradient h2 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility Improvements */
.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animation for page load */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}