/* ========================================
MODERN SHOP PAGE STYLES
Compact, Clean, User-Friendly Design
======================================== */

:root {
    --primary-color: #28a745;
    --secondary-color: #ff9f00;
    --success-color: #28a745;
    --danger-color: #ff3f6c;
    --warning-color: #ffc107;
    --text-primary: #212121;
    --text-secondary: #878787;
    --border-color: #e0e0e0;
    --bg-light: #f1f3f6;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s ease;
}

/* ========================================
   LAYOUT
   ======================================== */

.modern-shop-container {
    background-color: var(--bg-light);
    min-height: 100vh;
    padding-bottom: 40px;
    position: relative;
    /* Limit overlays to the shop area */
}

.shop-topbar {
    padding-top: 20px !important;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.breadcrumb {
    font-size: 12px;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* ========================================
   FILTER PANEL (SIDEBAR)
   ======================================== */

.filter-panel {
    background-color: var(--white);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.filter-header h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-header h6 i {
    margin-right: 6px;
    color: var(--primary-color);
}

/* Clear All link - smaller and aligned */
.filter-header .btn-link {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--success-color);
    text-decoration: none;
}

.filter-header .btn-link:hover {
    color: #218838;
    text-decoration: underline;
}

.filter-header .btn-link.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Counter badge for active filters */
.filter-count-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.12);
    border-radius: 999px;
}

/* Active Filters Pills */
.active-filters-pills {
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}

.active-filters-pills:empty {
    display: none;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: var(--bg-light);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-primary);
}

.filter-pill .remove-filter {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1;
}

.filter-pill .remove-filter:hover {
    color: var(--danger-color);
}

/* Filter Sections */
.filter-section {
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.filter-section-header:hover {
    background-color: var(--bg-light);
}

.filter-section-header i {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.filter-section-header[aria-expanded="false"] i {
    transform: rotate(-90deg);
}

.filter-section-body {
    padding: 0 16px 16px;
}

/* Filter Search */
.filter-search {
    margin-bottom: 12px;
}

.filter-search input {
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.filter-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(40, 116, 240, 0.1);
}

/* Filter Options */
.filter-options {
    max-height: 200px;
    overflow-y: auto;
}

.filter-options::-webkit-scrollbar {
    width: 4px;
}

.filter-options::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.filter-options::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-primary);
    transition: var(--transition);
}

.filter-option:hover {
    color: var(--primary-color);
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--success-color);
}

.filter-option span {
    flex: 1;
}

/* Color Filter Options */
.color-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Color swatch styles moved to ProductDetails.css for product details page */
/* Keeping minimal styles here for filter sidebar if needed */
.color-filter-option .color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.color-filter-option input:checked~.color-swatch {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(40, 116, 240, 0.2);
}

/* Price Range Slider */
.price-range-slider {
    padding: 8px 0;
}

.price-range-slider .form-range {
    height: 4px;
    background: linear-gradient(to right, #ddd 0%, #28a745 50%, #28a745 50%, #ddd 100%);
    border: none;
    outline: none;
}

.price-range-slider .form-range::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: var(--success-color);
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
}

.price-range-slider .form-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--success-color);
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
    border-radius: 50%;
    cursor: pointer;
    -moz-appearance: none;
}

.price-range-slider .form-range::-webkit-slider-track {
    background: transparent;
}

.price-range-slider .form-range::-moz-range-track {
    background: transparent;
}

/* ========================================
   PRODUCTS HEADER BAR
   ======================================== */

.products-header-bar {
    background-color: var(--white);
    padding: 12px 16px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.sort-section {
    display: flex;
    align-items: center;
}

.sort-section label {
    margin-bottom: 0;
    white-space: nowrap;
}

.sort-section .form-select {
    border: 1px solid var(--border-color);
    font-size: 13px;
    padding: 6px 32px 6px 12px;
    cursor: pointer;
}

.sort-section .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(40, 116, 240, 0.1);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.view-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.view-btn:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.view-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.view-btn i {
    font-size: 16px;
}

/* ========================================
   PRODUCTS GRID
   ======================================== */

.products-grid {
    display: grid;
    gap: 12px;
}

/* Grid View (Default) - Smaller cards with more columns */
.products-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* List View */
.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    padding: 16px;
    align-items: center;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
}

/* List View Mode */
.products-grid.list-view .product-card {
    flex-direction: row;
    align-items: flex-start;
    /* Align to top as requested */
    height: auto;
    min-height: 120px;
    /* Reduced specific height */
    overflow: visible;
    /* Allow absolute items to overlap if needed, but safer visible */
}

.products-grid.list-view .product-image {
    width: 110px;
    /* Smaller image */
    height: 110px;
    /* Fixed square */
    min-width: 110px;
    border-bottom: none;
    border-right: 1px solid #f0f0f0;
    flex-shrink: 0;
    margin-right: 20px;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.products-grid.list-view .product-image img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.products-grid.list-view .product-info {
    padding: 10px;
    align-items: flex-start;
    text-align: left;
    position: relative;
    /* For absolute positioning of children */
    padding-bottom: 50px;
    /* Space for footer at bottom */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

/* List View Only Elements - Hidden by default */
.list-view-only {
    display: none;
}

.products-grid.list-view .list-view-only {
    display: block;
}

/* Move Category to Top Right */
.products-grid.list-view .product-category-list {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

/* List View Description */
.products-grid.list-view .product-description-list {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 10px;
}

.products-grid.list-view .product-title {
    font-size: 14px;
    margin-bottom: 4px;
    padding-right: 80px;
    /* Avoid overlap with category */
    min-height: auto;
    -webkit-line-clamp: 1;
    font-weight: 600;
}

.products-grid.list-view .product-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.products-grid.list-view .product-rating {
    margin-bottom: 8px;
}

/* Fix row layouts in list view */
.products-grid.list-view .product-colors-row {
    width: 100%;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center;
    margin: 4px 0;
    position: relative;
}

.products-grid.list-view .discount-badge {
    margin-left: auto;
    position: static;
    background: var(--danger-color);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.products-grid.list-view .product-price-row {
    width: 100%;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 24px;
    padding: 0;
    margin-top: 12px;
}

/* Discount Badge Position in List View */
.products-grid.list-view .product-colors-row .discount-badge {
    position: absolute;
    right: 10px;
    bottom: 50px;
    /* Above Footer */
    padding: 4px 8px;
    font-size: 9px;
    z-index: 5;
}

/* Footer Group at Bottom Right */
.products-grid.list-view .product-card-footer {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
}

.products-grid.list-view .product-actions-compact {
    padding: 0;
    width: auto;
    margin: 0;
}

.products-grid.list-view .btn-add-to-cart {
    width: auto !important;
    padding: 6px 16px;
    font-size: 11px;
    height: 32px;
    border-radius: 4px;
}

.products-grid.list-view .product-price-row {
    margin: 0;
    width: auto;
    gap: 8px;
}

.products-grid.list-view .quantity-group-inline {
    margin-right: 0;
}


/* Fix mobile list view */
@media (max-width: 767px) {
    .products-grid.list-view .product-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-grid.list-view .product-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .products-grid.list-view .product-title {
        font-size: 16px;
    }
}

/* ========================================
   PRODUCT CARD STYLES - Moved to allproducts.css
   All product card, image, badges, actions, and button styles
   are now in the dedicated allproducts.css file
   ======================================== */

/* ========================================
   PAGINATION
   ======================================== */

.pagination-nav {
    margin-top: 32px;
}

.pagination {
    gap: 4px;
}

.pagination .page-item .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 4px;
    transition: var(--transition);
}

.pagination .page-item .page-link:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination .page-item.disabled .page-link {
    background-color: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
}

.loading-overlay .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

/* Loading bar at top for faster visual feedback */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    z-index: 10001;
    animation: loadingProgress 1s ease-in-out infinite;
    display: none;
}

@keyframes loadingProgress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.loading-bar.active {
    display: block;
}

/* Filter checkbox loading state */
input[type="checkbox"][data-filter-type].filtering {
    opacity: 0.6;
    pointer-events: none;
}

/* Products grid loading state */
.products-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   MOBILE FILTER OFFCANVAS
   ======================================== */

.offcanvas-footer {
    background-color: var(--white);
}

#mobileFiltersContent .filter-panel {
    box-shadow: none;
    position: static;
    max-height: none;
}

/* ========================================
   RESPONSIVE DESIGN - 移动端对齐修正
   ======================================== */

/* Tablet */
@media (max-width: 991px) {
    .products-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .filter-panel {
        top: 70px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .shop-topbar {
        padding-top: 120px !important;
        background-color: var(--white);
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 16px;
    }

    .breadcrumb {
        font-size: 11px;
    }

    .results-info {
        font-size: 11px;
    }

    .products-grid.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Product Card - Mobile Optimized */
    .product-card {
        border-radius: 6px;
    }

    /* Product Image - Mobile */
    .product-image-wrapper {
        height: 140px;
    }

    /* Product Info - Mobile */
    .product-info {
        padding: 8px;
        gap: 3px;
    }

    /* Product Title - Mobile */
    .product-title {
        font-size: 11px;
        min-height: 28px;
    }

    /* Product Actions - Mobile */
    .product-actions {
        padding: 8px;
        padding-top: 0;
    }

    .product-actions .btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    /* Show badges on mobile always */
    .product-badges {
        opacity: 1;
        transform: translateX(0);
    }

    .badge-btn {
        width: 26px;
        height: 26px;
    }

    .badge-btn i {
        font-size: 11px;
    }

    /* 移动端数量选择器 */
    .quantity-group {
        height: 34px;
        width: 115px;
        min-width: 115px;
        max-width: 115px;
        border-width: 2px;
    }

    .quantity-group .qty-btn {
        width: 34px;
        min-width: 34px;
        max-width: 34px;
        font-size: 16px;
    }

    .quantity-input {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        font-size: 14px;
        line-height: 34px;
    }

    /* 移动端Add to Cart按钮 */
    .btn-add-to-cart {
        height: 34px;
        padding: 0 10px;
        font-size: 11px;
        flex: 1;
    }

    .product-price .badge {
        padding: 2px 6px;
        font-size: 10px;
    }

    .product-quick-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .quick-action-btn {
        width: 28px;
        height: 28px;
    }

    .quick-action-btn i {
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .products-grid.grid-view {
        gap: 8px;
    }

    .product-info {
        padding: 12px;
    }

    .product-title {
        font-size: 12px;
        height: 32px;
    }

    .current-price {
        font-size: 14px;
    }

    .product-rating {
        margin-bottom: 6px;
    }

    .stars i {
        font-size: 10px;
    }

    .rating-count {
        font-size: 10px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-truncate-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ========================================
   PRODUCT CARD COLOR SWATCHES
   ======================================== */

.product-colors {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0;
    flex-wrap: wrap;
    flex: 0 1 auto;
}

/* Compact Row Layout - Colors with Discount Badge on right */
.product-colors-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    margin: 4px 0;
    width: 100%;
}

.product-colors-row .product-colors {
    margin: 0;
}

/* Compact Row Layout - Price with Quantity on right */
.product-price-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    margin: 4px 0;
    width: 100%;
    padding: 0 10px;
}

.product-price-row .current-price {
    font-size: 15px;
    font-weight: 700;
    color: #28a745;
}

/* Inline Quantity Group (compact, no-wrap) */
.quantity-group-inline {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: visible;
    height: 24px;
    background-color: #fff;
    flex-shrink: 0 !important;
}

.quantity-group-inline .qty-btn {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 100%;
    border: none;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0 !important;
    padding: 0;
}

.quantity-group-inline .quantity-input {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #212529;
    background-color: #fff;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 0;
    flex-shrink: 0 !important;
}

/* Compact Actions */
.product-actions-compact {
    padding: 6px 10px 10px 10px;
}

.color-swatch-mini {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-swatch-mini:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-swatch-more {
    font-size: 10px;
    color: var(--text-secondary);
    padding: 0 4px;
    background-color: var(--bg-light);
    border-radius: 8px;
}

/* Mobile - slightly smaller swatches */
@media (max-width: 767px) {
    .color-swatch-mini {
        width: 12px;
        height: 12px;
    }

    .product-colors {
        gap: 3px;
        margin: 4px 0;
    }
}

/* Green theme overrides for AllProducts page to match Quick View modal */
.modern-shop-container .btn-primary {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.modern-shop-container .btn-primary:hover,
.modern-shop-container .btn-primary:focus {
    background-color: #218838;
    border-color: #1e7e34;
}

.modern-shop-container .btn-outline-primary {
    color: var(--success-color);
    border-color: var(--success-color);
}

.modern-shop-container .btn-outline-primary:hover,
.modern-shop-container .btn-outline-primary:focus {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: var(--white);
}

.modern-shop-container .spinner-border.text-primary {
    color: var(--success-color) !important;
}

/* Active pills and selected states in filters */
.filter-pill {
    background-color: rgba(40, 167, 69, 0.1);
}

.filter-option:hover {
    color: var(--success-color);
}

.color-filter-option input:checked~.color-swatch {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

/* View toggle active state */
.view-btn.active {
    background-color: var(--success-color);
}

/* Price slider thumb color */
.price-range-slider .form-range::-webkit-slider-thumb {
    background: var(--success-color);
}

.price-range-slider .form-range::-moz-range-thumb {
    background: var(--success-color);
}

/* Pagination active state */
.pagination .page-item.active .page-link {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* Loading spinner and states */
.loading-overlay .spinner-border {
    color: var(--success-color);
}

/* Header click-through safeguards for AllProducts */
.modern-shop-container {
    z-index: 1;
}

.header-top,
.category-bar,
header,
.navbar,
.site-header {
    position: relative;
    z-index: 10000 !important;
    pointer-events: auto !important;
}

.modern-shop-container .loading-overlay {
    z-index: 1;
    /* keep beneath header */
    pointer-events: none;
    /* never block header/menu */
}

/* Quick View Modal Quantity Styling */
#quickViewModal .quantity-section {
    margin-bottom: 1.5rem;
}

#quickViewModal .quantity-group {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    height: 40px;
}

#quickViewModal .quantity-group .qty-btn {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 18px;
}

#quickViewModal .quantity-input {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    font-size: 16px;
    line-height: 40px;
}

/* ========================================
   PRODUCT DETAILS PAGE - COMPACT MODERN DESIGN
   ======================================== */

.product-section {
    padding: 20px 0;
    background-color: var(--bg-light);
}

.product-section .container {
    max-width: 1200px;
}

.product-section .product-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-section .product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.product-section .product-rating i {
    color: var(--secondary-color);
    font-size: 14px;
}

.product-section .product-rating span {
    color: var(--text-secondary);
}

.product-section .product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.product-section .product-price #product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.product-section .product-price .original-price {
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.product-section .product-description {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.product-section .variant-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.product-section .variant-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-section .color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.product-section .color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.product-section .color-option:hover {
    transform: scale(1.1);
    border-color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.product-section .color-option.active {
    border-color: var(--success-color);
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.product-section .color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.product-section .color-option[style*="background-color: #fff"],
.product-section .color-option[style*="background-color: #ffffff"],
.product-section .color-option[style*="background-color: white"],
.product-section .color-option[style*="background: #fff"],
.product-section .color-option[style*="background: #ffffff"] {
    border-color: #ddd;
}

.product-section .color-option[style*="background-color: #fff"].active::after,
.product-section .color-option[style*="background-color: #ffffff"].active::after,
.product-section .color-option[style*="background-color: white"].active::after {
    color: var(--text-primary);
    text-shadow: none;
}

.product-section .variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.product-section .variant-option {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--white);
    min-width: 60px;
    max-width: 80px;
    position: relative;
    gap: 3px;
}

.product-section .variant-option:hover:not(.disabled) {
    border-color: var(--success-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.product-section .variant-option.active {
    border-color: var(--success-color);
    border-width: 2px;
    background-color: rgba(40, 167, 69, 0.05);
    box-shadow: var(--shadow-sm);
}

.product-section .variant-option.active::before {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    background-color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-section .variant-option.active::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.product-section .variant-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.product-section .variant-option .variant-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
}

.product-section .variant-option .color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.product-section .variant-option .age-badge {
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 8px;
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45px;
}

.product-section .variant-option .variant-price {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.product-section .variant-option .variant-stock {
    font-size: 9px;
}

.product-section .variant-option .variant-stock .badge {
    font-size: 8px;
    padding: 2px 5px;
    font-weight: 500;
}

.product-section .age-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-section .age-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.product-section .product-options {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.product-section .quantity-group {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--white);
}

.product-section .qty-btn {
    width: 36px;
    height: 40px;
    border: none;
    background-color: var(--white);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-section .qty-btn:hover {
    background-color: var(--bg-light);
}

.product-section .qty-btn:active {
    background-color: #e0e0e0;
}

.product-section .quantity-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--white);
}

.product-section .quantity-input:focus {
    outline: none;
    background-color: var(--bg-light);
}

.product-section .add-to-cart {
    flex: 1;
    min-width: 160px;
    height: 44px;
    background-color: var(--success-color);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-section .add-to-cart:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.product-section .add-to-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.product-section .wishlist-btn {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--white);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-section .wishlist-btn:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
    background-color: #fff5f5;
}

.product-section .wishlist-btn i.bi-heart-fill {
    color: var(--danger-color);
}

.product-section .product-meta {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding: 12px;
    background-color: var(--bg-light);
    border-radius: 6px;
}

.product-section .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.product-section .meta-item i {
    font-size: 16px;
    color: var(--success-color);
}

@media (max-width: 768px) {
    .product-section .product-title {
        font-size: 18px;
    }

    .product-section .product-price #product-price {
        font-size: 20px;
    }

    .product-section .variant-option {
        min-width: 55px;
        max-width: 70px;
        padding: 5px 6px;
    }

    .product-section .variant-option .age-badge {
        font-size: 7px;
        padding: 1px 3px;
        max-width: 40px;
    }

    .product-section .variant-option .variant-price {
        font-size: 10px;
    }

    .product-section .product-options {
        flex-direction: column;
        align-items: stretch;
    }

    .product-section .add-to-cart {
        width: 100%;
    }

    .product-section .product-meta {
        flex-direction: column;
        gap: 10px;
    }

    .product-section .color-option {
        width: 30px;
        height: 30px;
    }
}

/* ========================================
   PRODUCT GALLERY - KEEP UNCHANGED
   ======================================== */

.product-section .product-gallery {
    position: relative;
}

.product-section .main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.product-section .main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.product-section .thumbnail-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: thin;
}

.product-section .thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.product-section .thumbnail-container::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.product-section .thumbnail-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.product-section .thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-section .thumbnail:hover {
    border-color: var(--success-color);
}

.product-section .thumbnail.active {
    border-color: var(--success-color);
    border-width: 3px;
}

.product-section .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-section .slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
}

.product-section .slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-section .slider-btn:hover {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-section .slider-btn i {
    font-size: 18px;
    color: var(--text-primary);
}

#quickViewModal .action-buttons {
    margin-top: 1.5rem;
}

#quickViewModal .action-buttons .btn {
    padding: 0.75rem 1rem;
    font-size: 14px;
    font-weight: 600;
}

/* Product Details: Attributes & Collections */
.product-section .product-attributes {
    margin-bottom: 20px;
}

.product-section .attributes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.product-section .attribute-item {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.product-section .attribute-name {
    font-weight: 600;
    margin-right: 5px;
}

.product-section .attribute-value {
    color: var(--text-secondary);
}

.product-section .product-collection {
    margin-bottom: 20px;
}

.product-section .collection-badge {
    margin-top: 10px;
}

/* ========================================
   UNIQUE STYLES FROM wwwroot/css/modern-shop.css
   ======================================== */

/* Filters */
.filter-sidebar {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.filter-widget {
    margin-bottom: 2rem;
}

.filter-widget .widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.filter-widget .form-check-label {
    transition: color 0.3s;
}

.filter-widget .form-check-label:hover {
    color: var(--primary-color);
}

/* Active Filters & Sorting */
.active-filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--white-color);
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.shop-view-options .nav-link {
    color: var(--secondary-color);
}

.shop-view-options .nav-link.active {
    color: var(--primary-color);
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1060;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--danger-color);
}

/* Additional Styles */
.card-footer {
    padding: 1rem 1rem 1.5rem 1rem;
}

.quantity-selector {
    width: 100%;
    justify-content: center;
}

.btn-success {
    font-weight: 500;
    font-size: 1rem;
}

/**
 * AllProducts Page - Product Card Styles
 * Dedicated CSS for the All Products page
 */

/* ========================================
   PRODUCT CARD STYLES
   ======================================== */

.product-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #e0e0e0;
}

/* Product Image Container */
.product-card .product-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* Product Badges */
.product-card .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-card .badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.product-card .badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%) !important;
}

/* Quick Actions Buttons */
.product-quick-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-quick-actions .btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.product-quick-actions .btn:hover {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
    transform: scale(1.1);
}

.product-quick-actions .btn i {
    font-size: 16px;
}

/* Product Info Section */
.product-card .product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Product Title */
.product-card .product-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 32px;
    margin-bottom: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    letter-spacing: -0.2px;
}

.product-card .product-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-card .product-title a:hover {
    color: #28a745;
}

/* Product Rating */
.product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.product-card .product-rating .stars {
    display: flex;
    gap: 2px;
}

.product-card .product-rating .stars i {
    font-size: 10px;
    color: #ffc107;
}

.product-card .product-rating .rating-count {
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
}

/* Product Meta (Age Group) */
.product-card .product-meta {
    margin-bottom: 0;
}

.product-card .product-meta .badge {
    position: static;
    font-size: 10px;
    padding: 4px 8px;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 4px;
}

/* Product Price Section */
.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.product-card .price-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.product-card .current-price {
    font-size: 15px;
    font-weight: 700;
    color: #28a745;
    letter-spacing: -0.5px;
}

.product-card .original-price {
    font-size: 12px;
    color: #6c757d;
    text-decoration: line-through;
}

.product-card .product-price .badge {
    position: static;
    font-size: 9px;
    padding: 3px 8px;
    background-color: #ffc107;
    color: #000;
    font-weight: 700;
}

.product-card .discount-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    background-color: #dc3545;
    color: #fff;
    border-radius: 12px;
    white-space: nowrap;
}

/* NEW: Colors Row with Discount Badge */
.product-card .product-colors-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    margin: 4px 0;
    width: 100%;
}

.product-card .product-colors-row .product-colors {
    margin: 0;
    flex: 0 1 auto;
}

.product-card .product-colors-row .discount-badge {
    flex-shrink: 0;
}

/* NEW: Price Row with Inline Quantity */
.product-card .product-price-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    margin: 4px 0;
    width: 100%;
}

/* NEW: Inline Quantity Group (smaller, compact) */
.quantity-group-inline {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    height: 24px;
    background-color: #fff;
    flex-shrink: 0;
}

.quantity-group-inline .qty-btn {
    width: 20px;
    min-width: 20px;
    height: 100%;
    border: none;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.quantity-group-inline .qty-btn:hover {
    background-color: #e9ecef;
    color: #28a745;
}

.quantity-group-inline .quantity-input {
    width: 24px;
    min-width: 24px;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #212529;
    background-color: #fff;
    outline: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 0;
    flex-shrink: 0;
}

/* NEW: Compact Actions (just Add to Cart) */
.product-actions-compact {
    padding: 6px 10px 10px 10px;
}

/* Product Actions (Quantity + Add to Cart) */
.product-card .product-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 4px;
    padding: 0;
    /* Remove padding as container handles it */
}

/* Footer Wrapper for Grid View */
.product-card .product-card-footer {
    display: flex;
    flex-direction: column;
    padding: 0 10px 4px 10px;
    gap: 4px;
    width: 100%;
    margin-top: auto;
}

/* Product Actions (Quantity + Add to Cart) - Keep original selector for specificity in case */
.product-card .product-actions {
    display: flex;
    /* Ensure it stays valid if used */
}


/* Quantity Group - Shared for Card and Modal */
.product-card .quantity-group,
.product-details .quantity-group,
.modal .quantity-group {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    height: 34px;
    width: 100%;
    /* Default to 100% (card), override in flex context if needed */
    background-color: #fff;
    min-width: 100px;
    /* Ensure minimum width */
}

/* In modal, width should be auto or fixed */
.modal .quantity-group {
    width: 120px;
}

/* ========================================
   QUICK VIEW MODAL - ISOLATED STYLES
   Prevent style leaking from product card changes
   ======================================== */

/* Ensure modal appears above fixed header */
#quickViewModal {
    z-index: 100000 !important;
}

#quickViewModal .modal-backdrop,
.modal-backdrop {
    z-index: 99999 !important;
}

#quickViewModal .modal-dialog {
    z-index: 100001 !important;
}

/* Ensure toast notifications appear above modal */
#toast-container,
.toast-container {
    z-index: 100100 !important;
}

#quickViewModal .product-image-gallery {
    display: block;
}

#quickViewModal .main-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #f8f9fa;
}

#quickViewModal .main-quickview-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    display: block;
}

#quickViewModal .thumbnail-gallery {
    display: block !important;
}

#quickViewModal .thumbnail-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

#quickViewModal .quickview-thumbnail {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    object-fit: cover;
    transition: border-color 0.2s ease;
}

#quickViewModal .quickview-thumbnail.active {
    border-color: #28a745;
}

#quickViewModal .quickview-thumbnail:hover {
    border-color: #6c757d;
}

#quickViewModal .carousel-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#quickViewModal .carousel-indicators-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

/* Reset product-card styles that may leak into modal */
#quickViewModal .product-card,
#quickViewModal .product-image,
#quickViewModal .product-info {
    all: revert;
}

.product-card .qty-btn,
.product-details .qty-btn,
.modal .qty-btn {
    width: 30px;
    min-width: 30px;
    height: 100%;
    border: none;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    /* Ensure no padding */
}

.product-card .qty-btn:hover,
.product-details .qty-btn:hover,
.modal .qty-btn:hover {
    background-color: #e9ecef;
    color: #28a745;
}

.product-card .qty-btn:active,
.product-details .qty-btn:active,
.modal .qty-btn:active {
    background-color: #dee2e6;
}

.product-card .quantity-input,
.product-details .quantity-input,
.modal .quantity-input {
    width: 40px;
    flex: 1;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #212529;
    background-color: #fff;
    outline: none;
    border-left: 2px solid #e0e0e0;
    border-right: 2px solid #e0e0e0;
    padding: 0;
    /* Align text */
}

.product-card .quantity-input:focus,
.product-details .quantity-input:focus,
.modal .quantity-input:focus {
    outline: none;
}

/* Add to Cart Button */
.product-card .btn-add-to-cart,
.product-card .add-to-cart-btn {
    width: 100%;
    height: 36px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}

.product-card .btn-add-to-cart:hover,
.product-card .add-to-cart-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea87a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.product-card .btn-add-to-cart:active,
.product-card .add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
}

.product-card .btn-add-to-cart i,
.product-card .add-to-cart-btn i {
    font-size: 16px;
}

/* Loading State */
.product-card .add-to-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-card .add-to-cart-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Success State */
.product-card .add-to-cart-btn.success {
    background-color: #218838;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .product-card .product-image {
        height: 200px;
    }

    .product-card .product-title {
        font-size: 13px;
        min-height: 36px;
    }

    .product-card .current-price {
        font-size: 16px;
    }

    .product-card .product-actions {
        flex-direction: column;
        gap: 8px;
    }

    .product-card .quantity-group {
        width: 100%;
        justify-content: center;
    }

    .product-card .btn-add-to-cart,
    .product-card .add-to-cart-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .product-card .product-image {
        height: 180px;
    }

    .product-card .product-info {
        padding: 12px;
    }

    .product-card .product-title {
        font-size: 12px;
        min-height: 32px;
    }

    .product-quick-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .product-quick-actions .btn {
        width: 32px;
        height: 32px;
    }
}