:root {
    --primary: #ff5a5f;
    --primary-dark: #e04a50;
    --secondary: #484848;
    --light-gray: #f7f7f7;
    --medium-gray: #e0e0e0;
    --dark-gray: #767676;
    --success: #4CAF50;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
    --border-radius-sm: 6px;
        --primary-color: #ca3e2c;
    --secondary-color: #151515;
    --level-1-bg: #ca3e2c;
    --level-2-bg: #e05a4a;
    --level-3-bg: #e97b6d;
    --level-4-bg: #f19c91;
    --text-light: #fff;
    --text-dark: #151515;
}

/* Base Styles */
.modern-cart-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--secondary);
}

.price-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.original-price {
    text-decoration: line-through;
    color: var(--dark-gray);
    font-size: 0.7em;
}


@media (min-width: 431px) and (max-width: 567px) {
    .product-grid-six {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 430px) {
    .original-price {
        font-size: 10px;
    }
}

.discount-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.8em;
}

@media (max-width: 430px) {
    .discount-price {
        font-size: 13px
    }
}

.discount-badge {
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
    font-weight: bold;
    padding: 2px 6px;
    font-size: 0.6em;
}

@media (max-width: 430px) {
    .discount-badge {
        padding: 0px 6px;
        font-size: 9px;
    }
}

.price {
    font-weight: bold;
    color: var(--secondary);
}

.product-category-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #222;
    /* display: flex; */
    align-items: center;
    /* gap: 8px; */
}

.product-type {
    font-size: 17px;
    background: #ff6868;
    color: #000000;
    padding: 7px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.pack-size-indicator {
    font-size: 14px;
    color: var(--dark-gray);
    display: inline-flex;
    align-items: center;
    gap: 6px;

}

.pack-size-indicator::before {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    background: var(--dark-gray);
    border-radius: 50%;

}

.product-name-wrapper {
    position: relative;
}

.pack-size {
    display: inline-block;
    color: var(--dark-gray);
    background: var(--light-gray);
    border-radius: 4px;
    margin-top: 2px;
    font-size: 11px;
    padding: 2px 4px;
    height: unset;
}

@media (max-width: 430px) {
    .pack-size {
        font-size: 10px;
        padding: 0px 6px;
    }
}

/* Product Grid - 6 columns */
.product-grid-six {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin: 0;
}

/* Product Card */

.product-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    background: white;
    box-shadow: var(--shadow-sm);
}

.card-inner {
    position: relative;
    z-index: 2;
    background: white;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-card:hover .card-inner {
    transform: translateY(-8px);

}

/* Product Media */

.product-media {
    position: relative;
    padding-top: 100%;
    overflow: hidden;

}



.media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
}

.media-container img {
    height: 100%;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Product Badge */

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: white;
    color: var(--primary);
    padding: 0px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
    box-shadow: var(--shadow-sm);
}

/* Product Badge */
.discount-badge {
    box-shadow: var(--shadow-sm);
}

.discount-badge.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(255, 90, 95, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 90, 95, 0);
    }
}

/* Product Actions */
.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    transform: translateY(100%);
    transition: var(--transition);
    display: flex;
    gap: 8px;
    z-index: 3;
    opacity: 0;
}

.product-card:hover .product-actions {
    transform: translateY(0);
    opacity: 1;
}

/* Quantity Selector */

.quantity-selector {
    display: flex;

    border-radius: var(--border-radius-sm);

    overflow: hidden;

    background: white;

    /* flex: 1; */
    box-shadow: var(--shadow-sm);
    height: 32px;

}



.quantity-control {

    border: none;

    /* background: rgb(0, 0, 0); */

    width: 80px;

    height: 32px;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    padding: 0;

    transition: var(--transition-fast);
    border-radius: 0px;

}



.quantity-control:hover {

    background: var(--light-gray);

}


.quantity-control svg {
    width: 14px;
    height: 14px;
    stroke: #000;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.quantity-control:hover svg {
    stroke: var(--secondary);
    stroke-width: 5;
}



.quantity-display {

    position: relative;

    width: 90px;

    display: flex;

    align-items: center;

    justify-content: center;

}



.quantity-display input {

    width: 100%;

    border: none;

    text-align: center;

    font-size: 13px;

    font-weight: 600;

    background: transparent;


    -moz-appearance: textfield;

    position: relative;

    z-index: 1;

}



.quantity-display input::-webkit-outer-spin-button,

.quantity-display input::-webkit-inner-spin-button {

    -webkit-appearance: none;

    margin: 0;

}



.qty-value input::-webkit-outer-spin-button,

.qty-value input::-webkit-inner-spin-button {

    -webkit-appearance: none;

    margin: 0;

}



.quantity-animation {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: var(--light-gray);

    z-index: 0;

    opacity: 0;

}



/* Add to Cart Button */

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    min-width: 80px;

    padding: 0 10px;
    height: 32px;
    gap: 6px;
    font-size: 14px;

}

@media (max-width: 430px) {
    .add-to-cart-btn {
        padding: 0 0px;
        height: 28px;
        gap: 3px;

    }
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}



.add-to-cart-btn .btn-text {
    position: relative;
    z-index: 2;

    transition: var(--transition);

    white-space: nowrap;

}



.add-to-cart-btn .cart-icon,

.add-to-cart-btn .checkmark {

    position: relative;

    z-index: 2;

    display: flex;

    transition: var(--transition);

}



.add-to-cart-btn .checkmark {

    position: absolute;

    opacity: 0;

    transform: translateY(5px);

}



.add-to-cart-btn .cart-icon svg,

.add-to-cart-btn .checkmark svg {

    width: 14px;

    height: 14px;

    stroke: white;

    stroke-width: 2;

    stroke-linecap: round;

    stroke-linejoin: round;

    fill: none;

}



.add-to-cart-btn .btn-bg {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: var(--success);

    z-index: 1;

    opacity: 0;

    transition: var(--transition);

}



/* In Cart State */

.add-to-cart-btn.in-cart {

    background: var(--success);

}



.add-to-cart-btn.in-cart .btn-bg {

    opacity: 1;

}



/* Product Info */

.product-info {

    padding: 4px;

}



.product-name {

    font-size: 14px;

    font-weight: 500;

    margin: 0 0 6px 0;

    color: var(--secondary);

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;

}



.price-container {

    display: flex;

    align-items: center;

    gap: 6px;

}



.price {

    font-size: 15px;

    font-weight: 700;

    color: var(--primary);

}



.compare-price {

    font-size: 13px;

    color: var(--dark-gray);

    text-decoration: line-through;

}



/* Cart Confirmation */

.cart-confirmation {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: rgba(255, 255, 255, 0.9);

    display: flex;

    align-items: center;

    justify-content: center;

    opacity: 0;

    pointer-events: none;

    transition: var(--transition);

    z-index: 3;

}



.confirmation-content {

    display: flex;

    align-items: center;

    gap: 6px;

    background: var(--success);

    color: white;

    padding: 6px 12px;

    border-radius: 20px;

    font-size: 13px;

    font-weight: 500;

    transform: translateY(10px);

    transition: var(--transition);

}



.confirmation-content svg {
    width: 14px;
    height: 14px;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Empty State */

.empty-variants {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    text-align: center;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

.empty-variants svg {
    width: 48px;
    height: 48px;
    stroke: var(--medium-gray);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.empty-variants p {
    margin: 0;
    color: var(--dark-gray);
    font-size: 16px;
}

/* Animations */

@keyframes quantityChange {
    0% {
        transform: scale(1);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

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

@keyframes cartAdd {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

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

/* Responsive */

@media (max-width: 1600px) {
    .product-grid-six {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1400px) {
    .product-grid-six {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1200px) {
    .product-grid-six {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid-six {
        grid-template-columns: repeat(5, 1fr);
    }

    .product-category-title {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .product-grid-six {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-actions {
        transform: translateY(0);
        opacity: 1;
        padding: 4px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    }

    .product-card:hover .card-inner {
        transform: none;
    }

    .add-to-cart-btn .btn-text {
        display: block;
    }

}

@media (max-width: 430px) {

    /* Mobile-first responsive grid */
    .product-grid-six {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    @media (min-width: 480px) {
        .product-grid-six {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    .product-card {
        width: 100%;
        min-width: 0;
    }

    .row.overflow-auto.py-2 {
        display: block !important;
    }

    .modern-cart-container {
        width: 100%;
    }

    .cart_container-fluid,
    .cart_container {
        padding: 0 !important;
    }
}

@media (max-width: 1100px) {
    .add-to-cart-btn .btn-text {
        display: none !important;
    }

    .add-to-cart-btn {
        min-width: 44px;
        gap: unset;
        height: auto;
    }
}

.pack-discount-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    /* padding-left: 4px; */
}

.pack-discount-column .pack-size {
    background: var(--light-gray);
    color: var(--dark-gray);
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 6px;
    font-weight: 600;
    /* white-space: nowrap; */
}

.promotion-badge {
    background: linear-gradient(90deg, #ff6b6b, #ff8787);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

.promotion-more {
    font-size: 10px;
    color: #ff6b6b;
    font-weight: 500;
    margin-top: 2px;
}

.badge-free {
    background-color: #4CAF50;
    /* Green for free items */
    border-left: 4px solid #2E7D32;
}

.badge-discount {
    background-color: #2196F3;
    /* Blue for discounts */
    border-left: 4px solid #0D47A1;
}

.promo-special_price {
    font-weight: bold;
}

.promo-category_percent_discount:before {
    content: "⬇️ ";
}

.promo-buy_x_get_y .badge-text {
    text-transform: uppercase;
}

/* Cart Discount Price Styles */
.cart-item-card .item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 8px;
}

.cart-item-card .discount-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.cart-item-card .price-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-card .original-price {
    text-decoration: line-through;
    color: #a0a0a0;
    font-size: 12px;
}

.cart-item-card .discounted-price {
    color: #ca3d2b;
    font-weight: 600;
    font-size: 14px;
}

.cart-item-card .regular-price {
    color: #181818;
    font-weight: 500;
    font-size: 14px;
}

.cart-item-card .discount-badge {
    background-color: rgba(202, 61, 43, 0.1);
    color: #ca3d2b;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .cart-item-card .original-price {
        font-size: 11px;
    }

    .cart-item-card .discounted-price,
    .cart-item-card .regular-price {
        font-size: 13px;
    }

    .cart-item-card .discount-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

.pack-discount-column {
    text-align: center;
    /* sari content ko center align karega */
}

.pack-size {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
    padding: 2px 2px !important;
}

.promotion-list {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    border-radius: 8px;
    display: inline-block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    cursor: default;
}

 
.stock-warning {
    font-weight: 900;
    color: #c0392b;
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.stock-info {
    font-size: 13px;
    font-weight: 600;
}
.stock-info.text-success {
    color: #28a745;
}
.stock-info.text-danger {
    color: #dc3545;
}
/* Overlay container */
.notify-overlay {
    position: absolute;
    inset: 0; /* covers full image */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Dark gradient + subtle blur overlay */
.notify-overlay-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgb(0 0 0 / 31%), rgba(0, 0, 0, 0.107));
    backdrop-filter: blur(1px);
    z-index: 5;
}

/* Button styling */
.notify-overlay .btn {
    position: relative;
    z-index: 6;
    background: linear-gradient(135deg, var(--level-1-bg), var(--level-2-bg));
    color: var(--text-light);
    border: none;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

/* Hover: only color changes */
.notify-overlay .btn:hover {
    background: linear-gradient(135deg, var(--level-2-bg), var(--level-3-bg));
}

/* Disabled button style */
.notify-overlay .btn:disabled {
    background: linear-gradient(135deg, #777, #555);
    cursor: not-allowed;
    color: #e0e0e0;
}

/* Sold-out image effect */
.sold-out img {
    filter: grayscale(0.5);
    opacity: 0.5;
}

/* Product Grid Layout */
.product-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 6fr));
    gap: 10px;
    margin: 0;
    padding: 10px;
}

@media (max-width: 768px) {
    .product-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .product-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Product Card */
.product-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.product-card.sold-out img {
    filter: grayscale(0.5);
    opacity: 0.5;
}

/* Product Image Container */
.product-image-container {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.product-image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 3;
}

.product-badge, .promotion-badge, .discount-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.product-badge {
    background-color: white;
    color: var(--primary);
}

.promotion-badge {
    background: #ff6b6b;
    color: white;
}

.discount-badge {
    background-color: var(--primary);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 90, 95, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 90, 95, 0);
    }
}

/* Product Actions */
.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    transform: translateY(100%);
    transition: var(--transition);
    display: flex;
    justify-content: center;
    z-index: 3;
    opacity: 0;
}

.product-card:hover .product-actions {
    transform: translateY(0);
    opacity: 1;
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    padding: 8px 16px;
    gap: 6px;
    font-size: 14px;
    text-decoration: none;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cart-icon svg {
    fill: white;
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .product-actions {
        transform: translateY(0);
        opacity: 1;
        padding: 8px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    }
    
    .add-to-cart-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-text {
        display: none;
    }
}

/* Product Info */
.product-info {
    padding: 1px 6px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* .product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--secondary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 30px;
} */

.product-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.variant-badge, .type-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--light-gray);
    color: var(--secondary);
}

.promotion-info {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.price-section {
    margin-top: auto;
}

.price-with-discount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.original-price {
    text-decoration: line-through;
    color: var(--dark-gray);
    font-size: 14px;
}

.discount-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
}

.price {
    font-weight: bold;
    color: var(--secondary);
    font-size: 16px;
}

.stock-warning {
    font-weight: 900;
    color: #c0392b;
    font-size: 12px;
    margin-top: 8px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Out of Stock Overlay */
.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.overlay-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.notify-btn {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #ca3e2c, #e05a4a);
    color: white;
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.notify-btn:hover {
    background: linear-gradient(135deg, #e05a4a, #e97b6d);
}
.btn-main-product.add-cart {
    font-weight: bold;
    color: #ffffff;
    background: #db0000;
    padding: 4px 12px;
}
.stock-badge {
    display: inline-block;
    position: absolute;
    border-radius: 8px;
    font-size: 12px;
    position: absolute;
    right: 5px;
    bottom: 1px;
    padding: 1px 7px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
    animation: fadeIn 0.3s ease-in-out;
}

.low-stock {
    background-color: #ffc107; /* Yellow for low stock */
    color: #212529;
}

.out-of-stock {
    background-color: #dc3545; /* Red for out of stock */
}

/* For smooth animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ensure li has relative positioning for absolute badge placement */
.list-group-item {
    position: relative;
    overflow: hidden;
}
.btn-text{
    display: none;
}

.cart-error-confirmation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    border-radius: 8px;
} 
.cart-error-confirmation {
    background: rgb(71 67 67 / 90%); /* Red background */
}

.error-content {
    background: #00000085;
    padding: 20px;
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 50px
}
.error-content {
    color: #cb0000;
}

.error-message {
    font-weight: bold;
} 

/* Draw animation */
@keyframes drawTick {
    to {
        stroke-dashoffset: 0;
    }
}

/* Tick pop (bounce) */
@keyframes tickPop {
    0%   { transform: scale(0.4); }
    60%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Circle slight pop */
@keyframes popCircle {
    0%   { transform: scale(0.7); }
    100% { transform: scale(1); }
}
/* Modern Card Loading Animation */
.product-card.loading {
    position: relative;
    overflow: hidden;
}

.product-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(34 1 0 / 44%);
    backdrop-filter: blur(1.6px);
    -webkit-backdrop-filter: blur(1.6px);
    z-index: 100;
    border-radius: 12px;
}

.product-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 90, 95, 0.2);
    border-top: 4px solid var(--primary, #ff5a5f);
    border-right: 4px solid var(--primary, #ff5a5f);
    border-radius: 50%;
    animation: card-spin 0.6s linear infinite;
    z-index: 101;
    box-shadow: 0 4px 20px rgba(255, 90, 95, 0.3);
}

@keyframes card-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Modern Confirmation with Spinner */
.cart-confirmation.modern-loading {
    backdrop-filter: blur(1.2px);
    -webkit-backdrop-filter: blur(1.2px);
    border: 1px solid rgba(255, 90, 95, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.cart-confirmation.modern-loading .confirmation-content {
    background: none;
    box-shadow: none;
    border: none;
}

.cart-confirmation.modern-loading .confirmation-content div:first-child {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 90, 95, 0.2);
    border-top: 3px solid var(--primary, #ff5a5f);
    border-right: 3px solid var(--primary, #ff5a5f);
    border-radius: 50%;
    animation: fast-spin 0.5s linear infinite;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cart-confirmation.modern-loading .confirmation-content div:nth-child(2) {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-dark, #e04a50);
    margin-top: 12px;
}

@keyframes fast-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success State */
.product-card.success .cart-confirmation.modern-loading {
    background: rgb(34 1 0 / 44%);
    backdrop-filter: blur(1.6px);
}

.product-card.success .cart-confirmation.modern-loading .confirmation-content div:first-child {
    animation: none;
    border: 3px solid #fff;
    background: #fff;
    color: #4b030376;
    font-size: 24px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.product-card.success .cart-confirmation.modern-loading .confirmation-content div:first-child::before {
    content: '✓';
    font-weight: 900;
    color: var(--primary);
    font-size: 30px;
}

.product-card.success .cart-confirmation.modern-loading .confirmation-content div:nth-child(2) {
    color: #fff;
    font-weight: 700;
}
.qty-counter {
    left: 0;
    top: 4px;
    background-color: transparent !important;
    color: #d93549 !important;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    box-shadow: unset;
}

/* Mobile devices (max-width: 576px) */
@media (max-width: 576px) {
    .qty-counter {
        right: 119px !important;
        top: 7px !important;
        font-size: 25px !important;
    }
}

.qty-counter .qty-cart-icon {
    width: 20px;
    height: 25px;
}



@keyframes fadePop {
    0% { transform: scale(0.75); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}