.main-image {
    max-height: 400px;
    object-fit: contain;
}

.star-rating {
    display: flex;
    gap: 5px;
    cursor: pointer;
    font-size: 28px;
    color: #ccc;
}

.star-rating .star.selected,
.star-rating .star.hovered {
    color: #ffc107;
    /* gold */
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: fadeIn .25s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    padding: 10px;
    cursor: pointer;
    user-select: none;
    transition: 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ddd;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* Select2 */
/* Make Select2 match Bootstrap Input */
.select2-container .select2-selection--single {
    height: 48px !important;
    padding: 8px 12px;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
}

/* Placeholder text */
.select2-container .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important;
    font-size: 14px;
}

/* Selected text */
.select2-container .select2-selection__rendered {
    color: #212529 !important;
    line-height: 36px !important;
    font-size: 14px;
}

/* Remove blue outline */
.select2-container--default .select2-selection--single:focus {
    outline: none !important;
}

/* Dropdown arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 10px !important;
}

/* Move clear (x) button to the right */
.select2-container--default .select2-selection--single .select2-selection__clear {
    right: 35px !important;
    /* position inside input */
    left: auto !important;
    /* remove default left positioning */
    top: 50% !important;
    transform: translateY(-50%);
    position: absolute !important;
    font-size: 18px !important;
    color: #999;
    cursor: pointer;
}

/* Dropdown menu */
.select2-container .select2-dropdown {
    border-radius: 6px !important;
    border: 1px solid #ced4da !important;
}

/* Highlight item on hover */
.select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: white !important;
}

/* Dropdown item style */
.select2-results__option {
    padding: 8px 12px;
    font-size: 14px;
}

/* Clear button inside select */
.select2-selection__clear {
    top: 50% !important;
    transform: translateY(-50%);
}

/* Select2 Ends */


.cart-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: #fff;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    display: none;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeSlide 0.4s ease-out;
}

@keyframes fadeSlide {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-social a {
    color: #333;
    transition: 0.3s ease;
}

.footer-social a:hover {
    color: #000;
    transform: translateY(-2px);
}

.filter-bar {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.filterRow,
.sortWrapper {
    display: inline-block !important;
    white-space: normal;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

/* Cart Page */

.cart-item-mobile {
    width: 100%;
    overflow: hidden;
}

.cart-item-mobile img {
    max-width: 70px;
    height: auto;
}

.cart-item-mobile button {
    border: none;
    background: transparent;
}

@media (max-width: 768px) {

    body,
    html {
        overflow-x: hidden !important;
    }

    :root {
        --primary-dark: #1a1a1a;
        --light-bg: #f5f7fa;
        --border: #e0e0e0;
        --text-gray: #666;
        --accent-gold: #d4af37;
        --danger-red: #e74c3c;
    }

    .cart-item-mobile {
        background: #ffffff;
        border-radius: 14px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        border: none;
        margin-bottom: 1rem;
        animation: slideInUp 0.4s ease-out;
    }

    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(15px);
        }

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

    .cart-item-header {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        position: relative;
    }

    .btn-remove-item {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(231, 76, 60, 0.1);
        color: var(--danger-red);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        flex-shrink: 0;
        font-size: 0.9rem;
    }

    .btn-remove-item:active {
        background: rgba(231, 76, 60, 0.2);
        transform: scale(0.92);
    }

    .cart-item-img {
        width: 70px;
        height: 70px;
        border-radius: 10px;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        flex-shrink: 0;
    }

    .cart-item-info {
        flex: 1;
        min-width: 0;
    }

    .cart-item-name {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary-dark);
        word-break: break-word;
        line-height: 1.4;
    }

    .cart-item-details {
        padding: 1.25rem;
        background: #ffffff;
    }

    .detail-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--light-bg);
    }

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

    .detail-label {
        font-size: 0.9rem;
        color: var(--text-gray);
        font-weight: 500;
    }

    .detail-value {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--primary-dark);
    }

    .qty-control-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        background: var(--light-bg);
        border-radius: 10px;
        padding: 0.5rem;
    }

    .qty-btn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        background: #ffffff;
        border: 1px solid var(--border) !important;
        color: var(--primary-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 0.85rem;
    }

    .qty-btn:active {
        background: var(--accent-gold);
        color: var(--primary-dark);
        border-color: var(--accent-gold) !important;
        transform: scale(0.9);
    }

    .qty-value {
        min-width: 30px;
        text-align: center;
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--primary-dark);
    }

    .detail-total {
        padding-top: 1rem;
        padding-bottom: 0;
        border-top: 2px solid var(--light-bg);
        border-bottom: none;
    }

    .detail-total .detail-value {
        font-size: 1.1rem;
        color: var(--accent-gold);
    }
}

/* Cart Page End */

/* Category Page */
@media (max-width: 768px) {
    .col-12.d-flex.justify-content-end.align-items-center.flex-wrap.gap-11 {
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        width: 100%;
    }

    .sortWrapper {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .sortWrapper select {
        width: 120px;
        font-size: 14px;
        padding: 5px 8px;
    }

    .filterRow {
        text-align: right;
    }

    .price-range-subtitle {
        font-size: 14px;
        display: block;
        margin-bottom: 4px;
    }

    .price-range {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        width: 140px;
    }

    .price-range input[type="range"] {
        width: 100%;
    }
}

/* Category Page End */

/* Header Cart Icon */

.cart-icon-wrapper {
    position: relative;
}

.phCartBubble {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #000;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 768px) {

    .cart-icon-wrapper {
        position: relative !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .cart-icon-wrapper .phCartBubble {
        top: -6px !important;
        right: -6px !important;
        width: 16px !important;
        height: 16px !important;
        font-size: 10px !important;
    }
}

/* Header Cart Icon Ends */