.btn-check:checked + .btn-outline-secondary {
    background-color: #e8f5e9;
    border-color: #28a745;
    color: #28a745;
}

.thumbnail-img:hover {
    opacity: 0.8;
}

#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#quantity[type=number] {
    -moz-appearance: textfield;
}

#quantity:focus {
    outline: none;
    box-shadow: none;
}

.custom-range-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.custom-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #28a745;
    cursor: pointer;
}

.custom-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #28a745;
    cursor: pointer;
    border: none;
}

.quantity-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-modal {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    right: 0;
}

.cart-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.cart-close:hover {
    color: #000;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #3cb815;
}

.cart-item:first-child {
    padding-top: 0;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #3cb815;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.cart-item-size {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.cart-item-material {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #3cb815;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 2px solid #3cb815;
    border-radius: 5px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.quantity-btn {
    width: 44px;
    height: 44px;
    background: white;
    color: #3cb815;
    border: none;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.quantity-btn:hover {
    background: #3cb815;
    color: white;
}

.quantity-input {
    width: 70px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: white;
    color: #3cb815;
}

.delete-btn {
    background: #fff5f5;
    color: #dc3545;
    border: 2px solid #feb2b2;
    border-radius: 5px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.12);
}

.delete-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.delete-btn i {
    font-size: 16px;
}

.cart-item-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}


/* Cart Footer */
.cart-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.subtotal-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.subtotal-amount {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.cart-buttons {
    display: flex;
    gap: 10px;
}

.cart-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center; 
    display: flex;
    justify-content: center; 
    align-items: center;     
    color: #fff; 
}


.view-cart-btn {
    background: #3cb815;
    color: #ffffff;
}

.view-cart-btn:hover {
    background: #3bb815f3;
}

.checkout-btn {
    background: #000000;
    color: rgb(255, 255, 255);
}

.checkout-btn:hover {
    background: #0f0f0f;
}


/* Responsive */
@media (max-width: 576px) {
    .cart-modal {
        max-width: 100%;
        right: -100%;
    }
}

/* Quantity Modal Styles */
.quantity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quantity-modal-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.quantity-modal {
    background: white;
    border-radius: 12px;
    padding: 35px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.quantity-modal-overlay.active .quantity-modal {
    transform: scale(1);
}

.quantity-modal h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 26px;
    font-weight: 700;
}

.quantity-modal p {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 15px;
}

#modalCurrentAmount {
    margin-bottom: 20px;
}

#modalCurrentAmount p {
    color: #666 !important;
    font-size: 14px;
    margin: 0 0 20px 0 !important;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 6px;
    border-left: 4px solid #3cb815;
}

.quantity-input-group {
    margin-bottom: 30px;
}

.quantity-input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.quantity-input-group input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    font-weight: 500;
}

.quantity-input-group input[type="number"]:focus {
    outline: none;
    border-color: #3cb815;
    box-shadow: 0 0 0 4px rgba(60, 184, 21, 0.1);
}

.quantity-unit-inline {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #3cb815;
    font-size: 15px;
    font-weight: 600;
    pointer-events: none;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 4px;
}

.quantity-input-group input[type="number"]::-webkit-outer-spin-button,
.quantity-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input-group input[type="number"] {
    -moz-appearance: textfield;
}

.price-info {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #3cb815;
}

.price-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.price-info-row:last-child {
    margin-bottom: 0;
}

.price-info-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.price-info-value {
    font-weight: 700;
    color: #3cb815;
    font-size: 16px;
}

.price-info-value-small {
    font-weight: 600;
    color: #35a010;
    font-size: 13px;
}

.price-info-row.total-price {
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    margin-top: 12px;
}

.price-info-row.total-price .price-info-label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
}

.price-info-row.total-price .price-info-value {
    font-size: 20px;
    color: #2c3e50;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.modal-btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #dee2e6;
}

.modal-btn-cancel:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.modal-btn-confirm {
    background: #3cb815;
    color: white;
}

.modal-btn-confirm:hover {
    background: #35a010;
    box-shadow: 0 4px 12px rgba(60, 184, 21, 0.3);
}

.modal-btn:active {
    transform: scale(0.98);
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 50px;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsive */
@media (max-width: 576px) {
    .quantity-modal {
        padding: 25px;
        max-width: 95%;
    }

    .quantity-modal h3 {
        font-size: 22px;
    }

    .quantity-modal p {
        font-size: 14px;
    }

    .modal-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* PRODUCT ACTION BUTTONS - RESPONSIVE CSS ONLY   */

/* Medium Tablets (768px - 991px) */
@media (max-width: 991.98px) {
    #addToCartBtn,
    #buyNowBtn {
        padding: 0.75rem 2.5rem !important;
        font-size: 15px;
    }
    
    #addToCartBtn i,
    #buyNowBtn i {
        font-size: 15px;
    }
}

/* Small Tablets and Large Phones (576px - 767px) */
@media (max-width: 767.98px) {
    #addToCartBtn,
    #buyNowBtn {
        padding: 0.7rem 2rem !important;
        font-size: 14px;
        flex: 1 1 auto;
        min-width: 140px;
    }
    
    #addToCartBtn i,
    #buyNowBtn i {
        font-size: 14px;
    }
    
    .d-flex.flex-wrap.gap-3 {
        gap: 0.75rem !important;
    }
}

/* Mobile Phones (375px - 575px) */
@media (max-width: 575.98px) {
    .d-flex.flex-wrap.gap-3 {
        flex-direction: column;
        gap: 0.65rem !important;
    }
    
    #addToCartBtn,
    #buyNowBtn {
        padding: 0.75rem 1.5rem !important;
        font-size: 14px;
        width: 100%;
        min-width: auto;
    }
    
    #addToCartBtn i,
    #buyNowBtn i {
        font-size: 14px;
    }
}

/* Extra Small Phones (< 375px) */
@media (max-width: 374.98px) {
    .d-flex.flex-wrap.gap-3 {
        gap: 0.6rem !important;
    }
    
    #addToCartBtn,
    #buyNowBtn {
        padding: 0.7rem 1.25rem !important;
        font-size: 13px;
    }
    
    #addToCartBtn i,
    #buyNowBtn i {
        font-size: 13px;
        margin-right: 0.35rem !important;
    }
}

/* Out of Stock Alert Responsive */
@media (max-width: 767.98px) {
    .alert.alert-danger {
        padding: 12px 16px !important;
        font-size: 14px;
    }
    
    .alert.alert-danger i {
        font-size: 18px !important;
    }
}

@media (max-width: 575.98px) {
    .alert.alert-danger {
        padding: 11px 14px !important;
        font-size: 13px;
    }
    
    .alert.alert-danger i {
        font-size: 16px !important;
    }
    
    .alert.alert-danger strong {
        font-size: 13px;
    }
}

@media (max-width: 374.98px) {
    .alert.alert-danger {
        padding: 10px 12px !important;
        font-size: 12px;
    }
    
    .alert.alert-danger i {
        font-size: 15px !important;
        margin-right: 0.4rem !important;
    }
    
    .alert.alert-danger strong {
        font-size: 12px;
    }
}

/* Product Details Wrapper Mobile Spacing */
@media (max-width: 991.98px) {
    #productDetailsWrapper {
        min-height: auto !important;
        padding-top: 20px;
    }
}

@media (max-width: 767.98px) {
    #productDetailsWrapper {
        padding-top: 15px;
    }
    
    .product-name-title {
        font-size: 1.75rem;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 575.98px) {
    #productDetailsWrapper {
        padding-top: 10px;
    }
    
    .product-name-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 374.98px) {
    #productDetailsWrapper {
        padding-top: 5px;
    }
    
    .product-name-title {
        font-size: 1.35rem;
        margin-bottom: 0.65rem !important;
    }
}