/* CSS Custom Properties for Cart Styling */
:root {
    /* Cart Layout Properties */
    --cart-mobile-card-height: 100px;
    --cart-touch-target: 44px;
    --cart-spacing-mobile: 0.75rem;
    --cart-spacing-desktop: 1rem;
    --cart-border-radius: 8px;
    
    /* Cart Visual Properties */
    --cart-shadow-mobile: 0 2px 4px rgba(0, 0, 0, 0.1);
    --cart-shadow-desktop: 0 2px 8px rgba(0, 0, 0, 0.1);
    --cart-border-color: #e0e0e0;
    --cart-background: #ffffff;
    
    /* Cart Typography */
    --cart-font-size-base: 16px;
    --cart-font-size-small: 14px;
    --cart-font-weight-normal: 400;
    --cart-font-weight-medium: 500;
    --cart-font-weight-bold: 600;
    --cart-line-height-tight: 1.2;
    --cart-line-height-normal: 1.4;
    
    /* Cart Colors */
    --cart-text-primary: #000000;
    --cart-text-secondary: #666666;
    --cart-text-muted: #6c757d;
    --cart-color-primary: #002343;
    --cart-color-secondary: #003D76;
    --cart-color-success: #28a745;
    --cart-color-danger: #dc3545;
    
    /* Cart Spacing */
    --cart-padding-mobile-horizontal: 12px;
    --cart-padding-mobile-vertical: 8px;
    --cart-padding-desktop-horizontal: 16px;
    --cart-padding-desktop-vertical: 12px;
    --cart-margin-between-items: 8px;
    
    /* Cart Animation */
    --cart-transition-fast: 0.1s ease;
    --cart-transition-normal: 0.2s ease;
    --cart-animation-scale: 1.05;
}

/* Loading Spinner Styles */
#loading-spinner {
    padding: 3rem 0;
}

/* Product Cart Controls Styles */
.product-cart-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

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

.product-cart-controls .quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

.product-cart-controls .quantity-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.product-cart-controls .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.375rem;
}

.product-cart-controls .text-muted {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Smart ZIP Code Input Styling */
#zip-code {
    transition: all 0.2s ease;
}

#zip-code.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

#zip-code.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

#zip-code.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

#zip-code.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* US ZIP code indicator (Canada support temporarily disabled) */
#zip-code.is-valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23198754'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

/* Canadian postal code styling (temporarily disabled)
#zip-code[placeholder*="A1A 1A1"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23007bff'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}
*/

#loading-spinner .spinner-border {
    border-width: 0.25em;
    animation: spinner-border 0.75s linear infinite;
}

#loading-spinner .text-muted {
    font-size: 1.1rem;
    margin-top: 1rem;
    color: #6c757d !important;
}

/* Fade in animation for loaded content */
.products-loaded {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #E5EEF6;
}

header {
    background-color: #002343;
    background-size: cover;
    padding: 20px;
}

.shop {
    background-color: #003D76;
}

.card img {
    height: 200px;
    object-fit: cover;
}

.footer-info {
    margin-top: 30px;
}

    .footer-info h4 {
        font-weight: bold;
    }

    .footer-info p {
        margin-bottom: 5px;
    }

.text-center img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.img-fluid {
    border-radius: 15px;
}

@media (max-width: 576px) {
    header .display-5 {
        font-size: 1.75rem;
    }

    .card img {
        height: 150px;
    }
}

a.custom-hover:hover {
    color: #000 !important;
}

h2.fw-bolder {
    margin-bottom: 20px;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.btn-cart {
    width: 80%;
    background-color: #002343;
    color: white;
}

    .btn-cart:hover {
        background-color: #001a2e;
        color: white;
    }

    .btn-cart.nowrap {
        white-space: nowrap;
    }

    .btn-cart:disabled,
    .btn-cart.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background-color: #6c757d;
        border-color: #6c757d;
        color: #ffffff;
    }

    .btn-cart:disabled:hover,
    .btn-cart.disabled:hover {
        background-color: #6c757d;
        border-color: #6c757d;
        color: #ffffff;
        transform: none;
    }

.cart-disabled-hint {
    font-size: 0.75rem;
    line-height: 1.2;
}

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -1px;
    }

.fixed-size-image {
    width: 90%;
    height: auto;
}

.modern-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

    .modern-link:hover {
        color: #0056b3;
        text-decoration: underline;
    }

@media (max-width: 576px) {
    .fixed-size-image {
        width: 100%;
        height: auto;
    }
}

/* Basic Slider Styles */
.slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

.slides {
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
}

.slider img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}

.slider .text-container {
    padding: 20px;
    color: white;
}

/* Navigation Dots */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 15;
    list-style: none;
    padding: 0;
    margin: 0;
}

    .carousel-indicators li {
        width: 12px;
        height: 12px;
        background-color: rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .carousel-indicators .active {
        background-color: white;
    }

/* Additional spacing for visual alignment */
.bg-darkblue {
    background-color: #002343 !important;
}

.bg-lightblue {
    background-color: #7FABD4 !important;
}

.carousel-item {
    padding: 40px 0;
    min-height: 400px;
}

    .carousel-item h1 {
        font-size: 2.8rem;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 20px;
    }

    .carousel-item p {
        font-size: 1.2rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .carousel-item .col-md-5 {
        padding-left: 40px;
        padding-right: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .carousel-item .col-md-7 {
        padding: 0;
        overflow: hidden;
    }

    .carousel-item img {
        border-radius: 0;
        object-fit: cover;
        width: 100%;
        height: auto;
    }

    /* Scoped Slide 3 Adjustments */
    .carousel-item.slide-3 img {
        margin: 0;
        padding: 0;
    }

    .carousel-item.slide-3 {
        padding-top: 0;
    }

/* Responsive behavior adjustments for mobile screens */
@media (max-width: 768px) {
    .carousel-item {
        text-align: center;
    }

        .carousel-item .col-md-5 {
            padding-left: 20px;
            padding-right: 20px;
        }

        .carousel-item img {
            height: auto;
        }
}

/* Cart Navigation Styles */
#cart-link {
    position: relative;
    font-weight: 500;
}

#cart-count {
    background-color: #0058a9;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}



    #cart-link.cart-has-items #cart-count {
        background-color: #0058a9;
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Cart Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quantity-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 4px;
}

.quantity-controls .btn:hover {
    transform: scale(1.05);
    transition: transform 0.1s ease;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}


/* Cart remove button styling */
.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.btn-outline-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Cart Layout Styles */
.cart-item-card {
    transition: box-shadow 0.2s ease;
}

.cart-item-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Cart Item Card Layout */
@media (max-width: 768px) {
    /* Cart container responsive layout */
    #cart-with-items {
        flex-direction: column !important;
    }
    
    #cart-with-items .col-lg-8,
    #cart-with-items .col-lg-4 {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .sticky-top {
        position: relative !important;
        top: auto !important;
        margin-top: 2rem;
    }
    
    /* Mobile cart item card styling */
    #cart-items-container .card {
        margin-bottom: var(--cart-margin-between-items);
        border: 1px solid var(--cart-border-color);
        border-radius: var(--cart-border-radius);
        box-shadow: var(--cart-shadow-mobile);
        background: var(--cart-background);
    }
    
    #cart-items-container .card-body {
        padding: 12px 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    /* Mobile cart item header */
    .cart-item-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 4px;
    }
    
    .cart-item-header .card-title {
        font-size: var(--cart-font-size-base);
        font-weight: var(--cart-font-weight-bold);
        line-height: var(--cart-line-height-tight);
        color: var(--cart-text-primary);
        margin: 0;
        flex: 1;
        padding-right: 8px;
        
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .cart-item-header .remove-btn {
        background: none;
        border: 1px solid rgba(220, 53, 69, 0.3);
        color: var(--cart-color-danger);
        font-size: 18px;
        font-weight: bold;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        cursor: pointer;
        transition: var(--cart-transition-fast);
        flex-shrink: 0;
    }
    
    .cart-item-header .remove-btn:hover {
        background-color: rgba(220, 53, 69, 0.1);
        border-color: var(--cart-color-danger);
        transform: scale(1.05);
    }
    
    .cart-item-header .remove-btn:active {
        transform: scale(0.95);
        background-color: var(--cart-color-danger);
        color: white;
    }
    
    /* Mobile cart item details */
    .cart-item-details {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .cart-item-price {
        font-size: var(--cart-font-size-small);
        color: var(--cart-text-secondary);
        font-weight: var(--cart-font-weight-normal);
        margin: 0;
    }
    
    .cart-item-quantity-section {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    /* Mobile quantity controls - compact design */
    .cart-item-quantity-section .quantity-controls {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .cart-item-quantity-section .quantity-controls .btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: var(--cart-font-weight-bold);
        border-radius: 6px;
        font-size: 16px;
        line-height: 1;
        transition: var(--cart-transition-fast);
        border: 1px solid #dee2e6;
        background-color: white;
        color: var(--cart-color-primary);
    }
    
    .cart-item-quantity-section .quantity-controls .btn:hover {
        border-color: var(--cart-color-primary);
        background-color: rgba(0, 35, 67, 0.05);
    }
    
    .cart-item-quantity-section .quantity-controls .btn:active {
        transform: scale(0.95);
        background-color: var(--cart-color-primary);
        color: white;
        border-color: var(--cart-color-primary);
    }
    
    .cart-item-quantity-section .quantity-display {
        min-width: 24px;
        text-align: center;
        font-weight: var(--cart-font-weight-bold);
        font-size: 14px;
        color: var(--cart-text-primary);
        padding: 0 4px;
        line-height: 1;
    }
    
    .cart-item-total {
        font-size: 14px;
        font-weight: var(--cart-font-weight-bold);
        color: var(--cart-text-primary);
        white-space: nowrap;
        background-color: rgba(0, 35, 67, 0.05);
        padding: 8px 12px;
        border-radius: 6px;
        border: 1px solid rgba(0, 35, 67, 0.1);
        height: 32px;
        display: flex;
        align-items: center;
        min-width: 80px;
        justify-content: center;
    }
    
    /* Hide the original Bootstrap column layout on mobile */
    #cart-items-container .card-body .row.align-items-center {
        display: none;
    }
        
    /* Additional mobile touch optimizations */
    .cart-mobile-layout * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ensure proper spacing for touch interactions */
    .cart-mobile-layout button,
    .cart-mobile-layout .btn {
        margin: 2px;
    }
    
    /* Improve visual feedback for all interactive elements */
    .cart-mobile-layout button:focus,
    .cart-mobile-layout .btn:focus {
        outline: 2px solid var(--cart-color-primary);
        outline-offset: 2px;
    }
    
    /* Prevent text selection on interactive elements */
    .cart-mobile-layout .quantity-controls,
    .cart-mobile-layout .remove-btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* Default: Show mobile layout, hide desktop layout */
#cart-items-container .card-body .cart-mobile-layout {
    display: block;
}

#cart-items-container .card-body .row.align-items-center {
    display: none;
}

/* Desktop cart enhancements - maintain existing layout but hide mobile structure */
@media (min-width: 769px) {
    /* Hide mobile layout structure on desktop */
    #cart-items-container .card-body .cart-mobile-layout {
        display: none !important;
    }
    
    /* Ensure original layout is visible on desktop */
    #cart-items-container .card-body .row.align-items-center {
        display: flex !important;
    }
}



/* Cart message styles removed - now using Bootstrap native toast */

/* Breadcrumb Navigation Styles */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #6c757d;
}

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

.breadcrumb-item a:hover {
    color: #001a2e;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
    font-weight: bold;
    margin: 0 0.5rem;
}

/* Responsive breadcrumb adjustments */
@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 0.25rem;
    }
}

/* Product Cart Controls Styles */
.product-cart-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

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

.product-cart-controls .quantity-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    background-color: white;
    color: #002343;
}

.product-cart-controls .quantity-controls .btn:hover {
    border-color: #002343;
    background-color: rgba(0, 35, 67, 0.05);
    transform: scale(1.05);
}

.product-cart-controls .quantity-controls .btn:active {
    transform: scale(0.95);
    background-color: #002343;
    color: white;
    border-color: #002343;
}

.product-cart-controls .quantity-display {
    min-width: 24px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #002343;
    padding: 0 4px;
    line-height: 1;
}

.product-cart-controls .text-muted {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive adjustments for product cart controls */
@media (max-width: 576px) {
    .product-cart-controls .quantity-controls .btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .product-cart-controls .quantity-display {
        font-size: 12px;
        min-width: 20px;
    }
    
    .product-cart-controls .text-muted {
        font-size: 0.7rem;
    }
}

/* Cart Quantity Input Styles */
.quantity-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    color: #002343;
    background-color: white;
    padding: 0 4px;
    line-height: 1;
    transition: all 0.2s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #002343;
    box-shadow: 0 0 0 2px rgba(0, 35, 67, 0.1);
}

.quantity-input:hover {
    border-color: #002343;
}

/* Mobile cart quantity input adjustments */
@media (max-width: 768px) {
    .cart-mobile-layout .quantity-input {
        width: 50px;
        height: 28px;
        font-size: 12px;
    }
}

/* Hide number input spinners */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input[type=number] {
    -moz-appearance: textfield;
}

/* Product page disabled button styling */
.product-cart-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.product-cart-controls .btn:disabled:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
    transform: none;
}

/* Cart Address Form Styles */
.quantity-controls .btn.disabled,
.quantity-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.quantity-controls .btn.disabled:hover,
.quantity-controls .btn:disabled:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Cart responsive design */
@media (max-width: 991.98px) {
    .col-lg-5, .col-lg-7 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-lg-5 {
        margin-bottom: 2rem;
    }
}

#zip-code {
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

/* Fix placeholder font for ZIP code */
#zip-code::placeholder {
    font-family: var(--bs-font-sans-serif);
    letter-spacing: normal;
}

/* Radar address autocomplete styles */
.radar-suggestion {
    padding: 10px 12px !important;
    border-bottom: 1px solid #e9ecef !important;
    font-size: 0.9rem !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.radar-suggestion:last-child {
    border-bottom: none !important;
}

.radar-suggestion:hover,
.radar-suggestion.selected {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

.radar-suggestions {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    background-color: white !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    z-index: 1050 !important;
    position: absolute !important;
    width: 100% !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 2px !important;
}

.radar-suggestion .address-line {
    font-weight: 500 !important;
    color: #212529 !important;
}

.radar-suggestion .address-details {
    font-size: 0.8rem !important;
    color: #6c757d !important;
    margin-top: 2px !important;
}

.address-input-container {
    position: relative !important;
}

/* Address locked display styling */
#address-locked {
    width: 100% !important;
}

#address-locked .border {
    border-color: #e9ecef !important;
    background-color: #f8f9fa !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#address-locked #locked-address-display {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #495057;
}

/* Ensure address form and locked display have same width */
#address-form, #address-locked {
    width: 100% !important;
    max-width: 100% !important;
}

/* Modern Cart Layout Styles */
#cart-items-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.cart-item-row {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.cart-item-row:hover {
    background-color: #f8f9fa;
}

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

.cart-item-info {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.cart-item-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    line-height: 1.3;
}

.cart-item-price {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

.cart-item-quantity .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    border: none;
    background: white;
    color: #495057;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cart-item-quantity .btn:hover {
    background: #e9ecef;
    transform: none;
}

.cart-item-quantity .btn:active {
    transform: scale(0.95);
}

.cart-item-quantity .quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    border: none;
    background: transparent;
    padding: 0;
}

.cart-item-total {
    font-weight: 600;
    color: #212529;
    min-width: 80px;
    text-align: right;
    font-size: 0.95rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.cart-item-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: scale(1.1);
}

.cart-item-remove:active {
    transform: scale(0.95);
    background: #dc3545;
    color: white;
}

/* Responsive adjustments for cart layout */
@media (max-width: 991.98px) {
    .cart-item-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .cart-item-info {
        margin-bottom: 0.5rem;
    }
    
    .cart-item-controls {
        justify-content: space-between;
        margin-left: 0;
    }
    
    .cart-item-total {
        text-align: left;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .cart-item-row {
        padding: 0.75rem;
    }
    
    .cart-item-name {
        font-size: 0.9rem;
    }
    
    .cart-item-quantity .btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .cart-item-quantity .quantity-display {
        min-width: 28px;
        font-size: 0.85rem;
    }
}

/* Category Filter Dropdown */
#category-dropdown-container {
    position: relative;
}

#category-dropdown-container .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#category-dropdown-container .dropdown-menu.show {
    display: block;
}

#category-dropdown-container .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

#category-dropdown-container .dropdown-item:hover,
#category-dropdown-container .dropdown-item.active {
    color: #1e2125;
    background-color: #e9ecef;
}

#category-dropdown-container .dropdown-item:first-child {
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0.25rem;
    padding-bottom: 0.75rem;
}

/* Global Search */
#global-search-container .dropdown-menu.show {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
}
#global-search-container .global-search-category-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
#global-search-container .dropdown-item:hover {
    background-color: #f0f4f8;
}
#global-search-container .input-group-text {
    border-right: none;
}
#global-search-container .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* ===== Mobile Product Table — card layout ===== */
@media (max-width: 768px) {
    /* Convert table to card list */
    .table-container table {
        border: none;
    }
    .table-container thead {
        display: none;
    }
    .table-container tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid #dee2e6;
        gap: 0.15rem 0;
    }
    /* Hidden cells */
    .table-container td.product-id { display: none !important; }

    /* All cells: reset default table styling */
    .table-container tbody td {
        border: none;
        padding: 0.2rem 0.35rem;
        background: transparent !important;
        font-size: 0.85rem;
    }

    /* Description — full width, top of card */
    .table-container td.td-desc {
        flex: 1 1 100%;
        font-weight: 600;
        font-size: 0.9rem;
        padding-bottom: 0.35rem;
    }

    /* Price — bold, left aligned */
    .table-container td.td-price {
        flex: 0 0 auto;
        font-weight: 700;
        color: #002343;
        text-align: left !important;
    }

    /* Weight — small, muted */
    .table-container td.td-weight {
        flex: 0 0 auto;
        color: #6c757d;
    }
    .table-container td.td-weight::before {
        content: '·';
        margin-right: 0.35rem;
        color: #adb5bd;
    }

    /* Availability — inline badge */
    .table-container td.td-avail {
        flex: 1 1 auto;
        text-align: right !important;
    }
    .table-container td.td-avail .badge {
        font-size: 0.72rem;
    }

    /* Action / cart cell — full width row */
    .table-container td.td-action {
        flex: 1 1 100%;
        text-align: center;
        padding-top: 0.4rem;
    }
    .table-container td.td-action .btn-cart {
        width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Quantity controls when item in cart */
    .table-container .product-cart-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    .table-container .product-cart-controls .quantity-input {
        width: 48px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .table-container td.td-desc {
        font-size: 0.82rem;
    }
    .table-container tbody td {
        font-size: 0.8rem;
    }
    .table-container td.td-action .btn-cart {
        font-size: 0.85rem;
        padding: 0.45rem 0.75rem;
    }
}
  