/* ===================================
   Spichlerz Lubawa - Custom Styles
   =================================== */

:root {
    /* Refined Restaurant Color Palette */
    --primary-color: #2c3e50;    /* Elegant dark gray */
    --secondary-color: #8b4513;  /* Rich brown */
    --accent-color: #f8f9fa;     /* Light gray */
    --dark-color: #343a40;       /* Dark gray */
    --darker-color: #212529;     /* Very dark gray */
    --light-color: #ffffff;      /* Pure white */
    --success-color: #28a745;    /* Bootstrap green */
    --warning-color: #ffc107;    /* Bootstrap warning */
    --danger-color: #dc3545;     /* Bootstrap danger */
    --gradient-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --gradient-brown: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Open Sans', sans-serif;
    --navbar-height: 56px;
}

/* ===================================
   Base Styles
   =================================== */

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* ===================================
   Accessibility
   =================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--dark-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
}

/* High contrast for better readability */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
        --accent-color: #666;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   Navigation - Enhanced
   =================================== */

.navbar {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    z-index: 1030 !important;
    position: sticky !important;
    top: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
}

.navbar-brand {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--primary-color) !important;
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: var(--secondary-color) !important;
}

.navbar-brand img {
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: rotate(5deg);
}

.brand-title {
    color: var(--secondary-color) !important;
}

.brand-subtitle {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 20px;
    margin: 0 0.2rem;
    padding: 0.5rem 1rem !important;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
    background: rgba(139, 69, 19, 0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link i {
    margin-right: 0.4rem;
    color: var(--primary-color);
}

.navbar-nav .nav-link:hover i {
    color: var(--secondary-color);
}

.btn-outline-light {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-outline-light:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* ===================================
   Main Content
   =================================== */

.main-content {
    min-height: calc(100vh - 200px);
}

.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-section.bg-light {
    background: var(--gradient-primary) !important;
    color: white !important;
}

.hero-section.bg-light .text-white {
    color: white !important;
}

.hero-pattern {
    z-index: 0 !important;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ===================================
   Cards and Components
   =================================== */

.dish-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.dish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.dish-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dish-card:hover .card-img-top {
    transform: scale(1.05);
}

.dish-card .card-body {
    padding: 1.5rem;
}

.dish-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.dish-card .card-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.price-tag {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dietary-badges .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge-vege {
    background-color: var(--success-color);
    color: white;
}

.badge-gluten-free {
    background-color: var(--danger-color);
    color: white;
}

/* ===================================
   Buttons - Modern Design
   =================================== */

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(26, 95, 63, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 95, 63, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--gradient-gold);
    border: none;
    color: var(--darker-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(196, 156, 109, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 156, 109, 0.4);
    color: var(--darker-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
    font-weight: 600;
    border-radius: 25px;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 95, 63, 0.3);
}

/* ===================================
   Cart
   =================================== */

.cart-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

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

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls .btn {
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.quantity-controls input {
    width: 60px !important;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.375rem 0.5rem;
    height: auto !important;
}

.cart-summary {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--accent-color);
}

.cart-summary .total-amount {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===================================
   Forms
   =================================== */

.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    margin: 2rem auto;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* ===================================
   Checkout Page Fixes
   =================================== */

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.checkout-form .card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.checkout-form .card-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.5rem;
}

.checkout-form .card-body {
    padding: 1.5rem;
}

.order-summary .card {
    /* position: sticky; */
    /* top: calc(var(--navbar-height) + 20px); */
    /* z-index: 10; */
}

.form-check {
    padding: 1rem;
    border: 2px solid #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.form-check:hover {
    border-color: var(--primary-color);
    background-color: rgba(44, 62, 80, 0.02);
}

.form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive checkout layout */
@media (max-width: 991.98px) {
    .order-summary .card {
        position: static;
        margin-bottom: 2rem;
    }
    
    .checkout-form .row {
        flex-direction: column-reverse;
    }
    
    .checkout-form .col-lg-5 {
        order: 1;
    }
    
    .checkout-form .col-lg-7 {
        order: 2;
    }
}

@media (max-width: 768px) {
    .checkout-container {
        padding: 0 10px;
    }
    
    .checkout-form .card-body {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}

/* ===================================
   Categories - Modern Card Style
   =================================== */

.category-nav {
    background: var(--gradient-primary);
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(26, 95, 63, 0.15);
}

.category-nav .nav-pills {
    gap: 0.75rem;
}

.category-nav .nav-link {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color) !important;
    font-weight: 600;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.category-nav .nav-link:hover {
    background: var(--gradient-brown) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
    border-color: var(--secondary-color);
}

.category-nav .nav-link.active {
    background: var(--gradient-brown) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 69, 19, 0.4);
    border-color: var(--secondary-color);
}

.category-nav .nav-link .badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.category-nav .nav-link.active .badge {
    background: var(--darker-color);
    color: white;
}

/* ===================================
   Alerts and Notifications
   =================================== */

.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(34, 139, 34, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 20, 60, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 140, 0, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* ===================================
   Loading and States
   =================================== */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===================================
   Footer
   =================================== */

footer {
    background-color: var(--dark-color) !important;
}

footer h5 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

footer .social-links a {
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: var(--accent-color) !important;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .dish-card .card-img-top {
        height: 150px;
    }
    
    .cart-item img {
        width: 60px;
        height: 60px;
    }
    
    .quantity-controls .btn {
        width: 30px;
        height: 30px;
    }
    
    .quantity-controls input {
        width: 50px;
    }
}

@media (max-width: 576px) {
    .auth-form {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0 !important;
    }
    
    .dish-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===================================
   Brand Styles for Navbar
   =================================== */

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: white;
    font-weight: 700;
    font-family: var(--font-primary);
}

/* ===================================
   Hero Section Enhancements
   =================================== */

.hero-features .badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* ===================================
   Category Section Improvements
   =================================== */

.category-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.category-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.category-section h3 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.category-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ===================================
   Enhanced Card Styles - Premium Look
   =================================== */

.dish-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(26, 95, 63, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dish-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.dish-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(26, 95, 63, 0.15);
    border-color: var(--secondary-color);
}

.dish-card .card-body {
    padding: 1.8rem;
    background: white;
}

.dish-card .card-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.dietary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.dietary-badges .badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge-vege {
    background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
    color: white;
}

.badge-gluten-free {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e67e22 100%);
    color: white;
}

/* ===================================
   Improved Button Styles
   =================================== */

.add-to-cart-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===================================
   Price Tag Enhancement - Luxury Style
   =================================== */

.price-tag {
    background: var(--gradient-gold);
    color: var(--darker-color);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(196, 156, 109, 0.3);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.price-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.dish-card:hover .price-tag::before {
    left: 100%;
}

/* ===================================
   Mobile Improvements
   =================================== */

@media (max-width: 768px) {
    .brand-text {
        margin-left: 0.5rem;
    }
    
    .brand-title {
        font-size: 0.7rem;
    }
    
    .brand-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-features .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        margin: 0.2rem;
    }
}

@media (max-width: 576px) {
    .hero-features {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dietary-badges .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ===================================
   Enhanced Category Navigation - New Modern Style
   =================================== */

.category-nav-wrapper {
    padding: 15px;
}

.category-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.category-pill {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color) !important;
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1);
    white-space: nowrap;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
}


.category-pill.active {
    background: var(--gradient-brown) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
    border-color: var(--secondary-color);
}

.category-pill.active * {
    color: white !important;
}

.category-pill.active:hover {
    background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
    transform: translateY(-2px);
    color: white !important;
    text-decoration: none !important;
}

.category-pill .badge {
    background: rgba(44, 62, 80, 0.2) !important;
    color: var(--primary-color) !important;
    font-size: 0.75em;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-pill.active .badge {
    background: var(--secondary-color) !important;
    color: white !important;
    font-weight: 700;
    border: 1px solid rgba(139, 69, 19, 0.2);
}

.category-pill:hover .badge {
    background: var(--secondary-color) !important;
    color: white !important;
    font-weight: 700;
    opacity: 1 !important;
    border: 1px solid rgba(139, 69, 19, 0.2);
}

/* Fix hover text color conflict for second line categories */
.category-pill:hover {
    background: var(--gradient-brown) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
    border-color: var(--secondary-color);
    text-decoration: none !important;
}

/* Universal hover text color fix for all category navigation elements */
.category-nav .nav-link:hover,
.category-nav .nav-link:hover *,
.category-pill:hover,
.category-pill:hover *,
.nav-link.category-pill:hover,
.nav-link.category-pill:hover *,
a.category-pill:hover,
a.category-pill:hover *,
.category-nav a:hover,
.category-nav a:hover *,
.category-nav .nav-pills .nav-link:hover,
.category-nav .nav-pills .nav-link:hover * {
    color: white !important;
    text-decoration: none !important;
}

/* Hero Section Text Shadow */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Hero Button Hover Enhancement */
.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4) !important;
}

/* Override existing category nav styles with new design */
.category-nav {
    background: rgba(248, 249, 250, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 20px rgba(44, 62, 80, 0.1) !important;
    padding: 1rem 0 !important;
    margin-bottom: 0 !important;
    margin-top: -8px !important;
    position: sticky !important;
    top: calc(var(--navbar-height) - 8px) !important;
    z-index: 1025 !important;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.category-nav.scrolled {
    background: rgba(248, 249, 250, 0.98) !important;
    box-shadow: 0 4px 25px rgba(44, 62, 80, 0.15) !important;
}

.category-nav .nav-pills {
    gap: 10px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

/* Force override Bootstrap link colors in category navigation */
.category-nav .nav-link {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.category-nav .nav-link:hover {
    color: white !important;
    text-decoration: none !important;
}


.category-nav .nav-link.active {
    color: white !important;
    text-decoration: none !important;
}

.category-nav .nav-link.active:hover {
    color: white !important;
    text-decoration: none !important;
}

.category-nav .nav-link:focus {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.category-nav .nav-link:visited {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.category-nav .nav-link.active:visited {
    color: white !important;
    text-decoration: none !important;
}

.category-pill.active:visited {
    color: white !important;
    text-decoration: none !important;
}

.category-pill.active:visited * {
    color: white !important;
}

/* Fix for "Wszystkie" button to have proper background */
.category-pill.active {
    background: var(--gradient-brown) !important;
}

/* ===================================
   Responsive Hamburger Menu for Categories
   =================================== */

.category-hamburger {
    background: var(--gradient-brown);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.category-hamburger:hover {
    background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.category-hamburger .category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Mobile category navigation */
@media (max-width: 991.98px) {
    .category-nav .container {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100%;
    }
    
    .category-nav-wrapper {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(248, 249, 250, 0.98);
        backdrop-filter: blur(15px);
        box-shadow: 0 8px 25px rgba(44, 62, 80, 0.15);
        border-top: 1px solid rgba(44, 62, 80, 0.1);
        z-index: 1021;
        max-height: 70vh;
        overflow-y: auto;
        padding: 20px 15px;
    }
    
    .category-nav-wrapper.show {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
    
    .category-nav-wrapper .nav-pills {
        flex-direction: column;
        gap: 10px !important;
        align-items: stretch;
    }
    
    .category-nav-wrapper .nav-item {
        width: 100%;
    }
    
    .category-nav-wrapper .category-pill {
        width: 100%;
        text-align: left;
        justify-content: space-between;
        display: flex;
        align-items: center;
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .category-nav {
        position: relative;
    }
}

/* Desktop - hide hamburger */
@media (min-width: 992px) {
    .category-nav .container {
        display: block;
    }
    
    .category-hamburger {
        display: none !important;
    }
    
    .category-nav-wrapper {
        display: block !important;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-nav-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .category-nav-wrapper .nav-pills {
        gap: 10px !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

/* Animation for mobile dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main menu section background consistency */
#menu {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.main-content {
    background: transparent;
}

/* Section spacing improvements */
.category-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.08);
    border: 1px solid rgba(44, 62, 80, 0.05);
}

/* ===================================
   FontAwesome Icon Fixes
   =================================== */

/* Ensure FontAwesome icons load properly */
.fas, .far, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.far {
    font-weight: 400;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

/* Force icon display over text */
i.fas::before,
i.far::before,
i.fab::before {
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

/* ===================================
   Toast Notifications System
   =================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    padding: 16px 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    border-left: 4px solid #007bff;
    position: relative;
    overflow: hidden;
}

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

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-success {
    border-left-color: var(--success-color);
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error {
    border-left-color: var(--danger-color);
}

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

.toast-warning {
    border-left-color: var(--warning-color);
}

.toast-warning .toast-icon {
    color: var(--warning-color);
}

.toast-info {
    border-left-color: #17a2b8;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--dark-color);
    font-size: 14px;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #666;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
}

.toast-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 0 0 12px 12px;
    transition: width 0.1s linear;
}

@keyframes toast-progress {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.toast-success .toast-progress-bar {
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.8), rgba(40, 167, 69, 0.6));
}

.toast-error .toast-progress-bar {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.8), rgba(220, 53, 69, 0.6));
}

.toast-warning .toast-progress-bar {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.8), rgba(255, 193, 7, 0.6));
}

.toast-info .toast-progress-bar {
    background: linear-gradient(90deg, rgba(23, 162, 184, 0.8), rgba(23, 162, 184, 0.6));
}

@keyframes toast-progress {
    to {
        transform: translateX(0);
    }
}

/* ===================================
   Custom Modal System
   =================================== */

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal.show {
    opacity: 1;
    visibility: visible;
}

.custom-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.custom-modal.show .custom-modal-content {
    transform: scale(1);
}

.custom-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #eee;
}

.custom-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-modal-body {
    padding: 20px 24px;
}

.custom-modal-text {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0;
}

.custom-modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

.custom-modal-footer .btn {
    min-width: 80px;
}

/* Mobile responsiveness for notifications */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
        padding: 14px 16px;
    }
    
    .custom-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .custom-modal-header,
    .custom-modal-body,
    .custom-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}
