/* ============================================================
   A1 CASH & CARRY
   PRODUCT CARDS
   FINAL RESPONSIVE + HOVER DETAILS
============================================================ */


/* ============================================================
   PRODUCT GRID
============================================================ */

.product-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;

}


/* ============================================================
   PRODUCT CARD
============================================================ */

.product-card {

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 14px;

    overflow: hidden;

    position: relative;

    transition:
        transform .3s ease,
        box-shadow .3s ease;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, .05);

}


.product-card:hover {

    transform:
        translateY(-6px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .14);

}


/* ============================================================
   PRODUCT IMAGE
============================================================ */

.product-image {

    height: 245px;

    background: #f7f8f7;

    position: relative;

    display: flex;

    justify-content: center;

    align-items: center;

    overflow: hidden;

}


/* ============================================================
   PRODUCT IMAGE
============================================================ */

.product-image img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    padding: 10px;

    position: relative;

    z-index: 1;

    transition:
        transform .45s ease;

}


.product-card:hover
.product-image img {

    transform:
        scale(1.08);

}


/* ============================================================
   HOVER PRODUCT DETAILS OVERLAY
============================================================ */

.product-hover-overlay {

    position: absolute;

    inset: 0;

    z-index: 20;

    display: flex;

    align-items: flex-end;

    justify-content: center;

    padding: 14px;

    background:
        linear-gradient(
            to top,
            rgba(0, 90, 22, .97) 0%,
            rgba(0, 120, 35, .91) 55%,
            rgba(0, 90, 22, .20) 100%
        );

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(20px);

    transition:
        opacity .35s ease,
        visibility .35s ease,
        transform .35s ease;

}


.product-card:hover
.product-hover-overlay {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);

}


/* ============================================================
   HOVER CONTENT
============================================================ */

.hover-content {

    width: 100%;

    color: #ffffff;

    text-align: left;

}


/* ============================================================
   HOVER BRAND
============================================================ */

.hover-brand {

    display: inline-block;

    margin-bottom: 4px;

    color: #b9f5c4;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .8px;

}


/* ============================================================
   HOVER PRODUCT NAME
============================================================ */

.hover-product-name {

    margin: 0;

    color: #ffffff;

    font-size: 18px;

    line-height: 1.25;

    font-weight: 700;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;

}


/* ============================================================
   HOVER TYPE
============================================================ */

.hover-product-type {

    margin: 5px 0 8px;

    color: rgba(255,255,255,.82);

    font-size: 10px;

}


.hover-product-type span {

    padding: 0 4px;

    color: #b9f5c4;

}


/* ============================================================
   HOVER RATING
============================================================ */

.hover-rating {

    display: flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 8px;

    color: rgba(255,255,255,.82);

    font-size: 9px;

}


.hover-rating-box {

    padding: 4px 7px;

    border-radius: 5px;

    background: #ffffff;

    color: #087f23;

    font-size: 10px;

    font-weight: 700;

}


.hover-rating-box i {

    font-size: 8px;

}


/* ============================================================
   HOVER PRICE
============================================================ */

.hover-price {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 7px;

}


.hover-price strong {

    color: #ffffff;

    font-size: 20px;

}


.hover-price del {

    color: rgba(255,255,255,.65);

    font-size: 10px;

}


.hover-price span {

    padding: 3px 6px;

    border-radius: 4px;

    background: #ffcf33;

    color: #172033;

    font-size: 8px;

    font-weight: 800;

}


/* ============================================================
   HOVER STOCK
============================================================ */

.hover-stock {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 10px;

    color: #d8f9de;

    font-size: 9px;

    font-weight: 600;

}


.hover-stock i {

    color: #9cf3aa;

}


/* ============================================================
   HOVER ACTIONS
============================================================ */

.hover-actions {

    display: grid;

    grid-template-columns:
        1fr 1.25fr;

    gap: 7px;

}


.hover-actions button {

    min-height: 34px;

    border-radius: 6px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    padding: 0 7px;

    font-size: 9px;

    font-weight: 700;

    cursor: pointer;

    transition: .25s ease;

}


.hover-view-btn {

    background: rgba(255,255,255,.14);

    color: #ffffff;

    border: 1px solid rgba(255,255,255,.65);

}


.hover-view-btn:hover {

    background: #ffffff;

    color: #087f23;

}


.hover-add-cart-btn {

    background: #ffffff;

    color: #087f23;

    border: 1px solid #ffffff;

}


.hover-add-cart-btn:hover {

    background: #ffcf33;

    color: #172033;

    border-color: #ffcf33;

}


.hover-add-cart-btn:disabled {

    opacity: .5;

    cursor: not-allowed;

}


/* ============================================================
   PRODUCT IMAGE LINK
============================================================ */

.product-image-link {

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;

    z-index: 1;

}


/* ============================================================
   BADGE
============================================================ */

.product-badge {

    position: absolute;

    top: 12px;

    left: 12px;

    z-index: 30;

    background:
        var(--primary);

    color: white;

    padding:
        5px 9px;

    border-radius: 5px;

    font-size: 10px;

    font-weight: 700;

}


/* ============================================================
   WISHLIST
============================================================ */

.product-card .wishlist-btn,
.product-card .wishlist-product-btn,
.product-card .wishlist-button,
.product-card .wishlist {

    position: absolute !important;

    top: 12px !important;

    right: 12px !important;

    left: auto !important;

    bottom: auto !important;

    z-index: 100 !important;

    width: 38px !important;

    height: 38px !important;

    padding: 0 !important;

    margin: 0 !important;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    border-radius: 50% !important;

    background: #ffffff !important;

    color: #172033 !important;

    border: 1px solid #e5e7eb !important;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, .14);

    cursor: pointer;

    transition:
        transform .25s ease,
        color .25s ease,
        background .25s ease,
        box-shadow .25s ease;

}


.product-card .wishlist-btn i,
.product-card .wishlist-product-btn i,
.product-card .wishlist-button i,
.product-card .wishlist i {

    font-size: 16px;

    line-height: 1;

}


.product-card .wishlist-btn:hover,
.product-card .wishlist-product-btn:hover,
.product-card .wishlist-button:hover,
.product-card .wishlist:hover {

    color: #e53935 !important;

    background: #ffffff !important;

    transform:
        scale(1.10);

    box-shadow:
        0 6px 18px rgba(0, 0, 0, .20);

}


.product-card .wishlist-btn.active,
.product-card .wishlist-product-btn.active,
.product-card .wishlist-button.active,
.product-card .wishlist.active {

    color: #e53935 !important;

    background: #fff5f5 !important;

}


/* ============================================================
   LOW STOCK
============================================================ */

.low-stock {

    position: absolute;

    bottom: 8px;

    left: 8px;

    z-index: 30;

    background: #fff3cd;

    color: #856404;

    padding:
        4px 7px;

    border-radius: 4px;

    font-size: 9px;

    font-weight: 600;

}


/* ============================================================
   PRODUCT INFORMATION
============================================================ */

.product-info {

    padding: 16px;

}


.product-brand {

    font-size: 11px;

    color:
        var(--primary);

    font-weight: 600;

}


.product-name {

    font-size: 16px;

    margin-top: 4px;

    line-height: 1.4;

    height: 45px;

    overflow: hidden;

}


.product-type {

    font-size: 11px;

    color:
        var(--text-light);

    margin-top: 5px;

}


/* ============================================================
   RATING
============================================================ */

.product-rating {

    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 10px;

}


.rating-box {

    background:
        #16853a;

    color: white;

    border-radius: 5px;

    padding:
        3px 6px;

    font-size: 11px;

    font-weight: 600;

}


.rating-box i {

    font-size: 8px;

}


.review-count {

    color: #777;

    font-size: 11px;

}


/* ============================================================
   PRICE
============================================================ */

.product-price {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 10px;

}


.product-price strong {

    font-size: 19px;

    color: #101828;

}


.product-price del {

    color: #98a2b3;

    font-size: 12px;

}


.product-price span {

    color:
        #07862a;

    font-size: 11px;

    font-weight: 700;

}


/* ============================================================
   PRODUCT ACTIONS
============================================================ */

.product-actions {

    display: grid;

    grid-template-columns:
        1fr 1.4fr;

    gap: 8px;

    margin-top: 15px;

}


.quick-view-btn,
.view-product,
.add-cart-btn {

    height: 38px;

    border-radius: 7px;

    font-size: 12px;

    font-weight: 600;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

}


.quick-view-btn,
.view-product {

    background:
        #f0f6f1;

    color:
        var(--primary);

    transition: .25s ease;

}


.quick-view-btn:hover,
.view-product:hover {

    background:
        #dff0e2;

    color:
        var(--primary-dark);

}


.add-cart-btn {

    background:
        var(--primary);

    color: white;

    transition: .25s ease;

}


.add-cart-btn:hover {

    background:
        var(--primary-dark);

    transform:
        translateY(-1px);

}


.add-cart-btn:disabled {

    opacity: .5;

    cursor: not-allowed;

    transform: none;

}


/* ============================================================
   NO PRODUCTS
============================================================ */

.no-products {

    grid-column:
        1 / -1;

    text-align: center;

    padding:
        70px 20px;

    color: #777;

}


.no-products i {

    font-size: 55px;

    color:
        var(--primary);

    margin-bottom: 15px;

}


.no-products h2,
.no-products h3 {

    font-size: 22px;

    color: #333;

    margin-bottom: 8px;

}


.no-products p {

    font-size: 13px;

    color: #777;

}


/* ============================================================
   NOTIFICATION
============================================================ */

.a1-notification {

    position: fixed;

    right: 25px;

    bottom: 25px;

    z-index: 9999;

    background:
        #16853a;

    color: white;

    padding:
        14px 20px;

    border-radius: 8px;

    display: flex;

    align-items: center;

    gap: 10px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .2);

    animation:
        notificationIn .3s ease;

}


.a1-notification.hide {

    opacity: 0;

    transform:
        translateY(20px);

}


@keyframes notificationIn {

    from {

        opacity: 0;

        transform:
            translateY(20px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


/* ============================================================
   DARK MODE
============================================================ */

body.dark-mode .product-card {

    background: #0d1b2a;

    border-color: #203a56;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, .35);

}


body.dark-mode .product-image {

    background: #091522;

}


body.dark-mode .product-name {

    color: #ffffff;

}


body.dark-mode .product-type {

    color: #9fb5ca;

}


body.dark-mode .product-price strong {

    color: #ffffff;

}


body.dark-mode .product-price del {

    color: #71869b;

}


/* DARK MODE WISHLIST */

body.dark-mode .product-card .wishlist-btn,
body.dark-mode .product-card .wishlist-product-btn,
body.dark-mode .product-card .wishlist-button,
body.dark-mode .product-card .wishlist {

    background: #11243a !important;

    color: #ffffff !important;

    border-color: #29445e !important;

}


body.dark-mode .product-card .wishlist-btn:hover,
body.dark-mode .product-card .wishlist-product-btn:hover,
body.dark-mode .product-card .wishlist-button:hover,
body.dark-mode .product-card .wishlist:hover {

    background: #1976d2 !important;

    color: #ffffff !important;

}


/* DARK MODE NORMAL BUTTONS */

body.dark-mode .quick-view-btn,
body.dark-mode .view-product {

    background: #102a45;

    color: #64b5f6;

}


body.dark-mode .quick-view-btn:hover,
body.dark-mode .view-product:hover {

    background: #153957;

    color: #90caf9;

}


/* DARK MODE HOVER */

body.dark-mode .product-hover-overlay {

    background:
        linear-gradient(
            to top,
            rgba(2, 18, 35, .98),
            rgba(5, 35, 55, .94),
            rgba(5, 35, 55, .20)
        );

}


body.dark-mode .hover-product-name {

    color: #ffffff;

}


/* ============================================================
   DESKTOP
============================================================ */

@media (min-width: 1201px) {

    .product-hover-overlay {

        display: flex;

    }

}


/* ============================================================
   1200px
============================================================ */

@media (max-width: 1200px) {

    .product-grid {

        grid-template-columns:
            repeat(3, 1fr);

    }

}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 768px) {

    .product-grid {

        grid-template-columns:
            repeat(2, 1fr);

        gap: 15px;

    }


    .product-image {

        height: 210px;

    }


    .product-info {

        padding: 13px;

    }


    /* Hover still works on supported touch devices */

    .product-hover-overlay {

        padding: 11px;

    }


    .hover-product-name {

        font-size: 15px;

    }


    .hover-price strong {

        font-size: 17px;

    }


    .hover-actions button {

        min-height: 32px;

        font-size: 8px;

    }


    .product-card .wishlist-btn,
    .product-card .wishlist-product-btn,
    .product-card .wishlist-button,
    .product-card .wishlist {

        top: 10px !important;

        right: 10px !important;

        width: 35px !important;

        height: 35px !important;

    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 600px) {

    .product-hover-overlay {

        padding: 10px;

    }


    .hover-brand {

        font-size: 8px;

    }


    .hover-product-name {

        font-size: 13px;

    }


    .hover-product-type {

        font-size: 8px;

        margin: 3px 0 5px;

    }


    .hover-rating {

        font-size: 8px;

        margin-bottom: 5px;

    }


    .hover-rating-box {

        font-size: 8px;

        padding: 3px 5px;

    }


    .hover-price {

        margin-bottom: 5px;

    }


    .hover-price strong {

        font-size: 15px;

    }


    .hover-price del {

        font-size: 8px;

    }


    .hover-price span {

        font-size: 7px;

    }


    .hover-stock {

        font-size: 8px;

        margin-bottom: 7px;

    }


    .hover-actions {

        gap: 5px;

    }


    .hover-actions button {

        min-height: 30px;

        font-size: 7px;

    }

}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 480px) {

    .product-grid {

        grid-template-columns:
            1fr;

        gap: 15px;

    }


    .product-image {

        height: 240px;

    }


    .product-info {

        padding: 14px;

    }


    .product-name {

        font-size: 15px;

    }


    .product-price strong {

        font-size: 18px;

    }


    .product-card .wishlist-btn,
    .product-card .wishlist-product-btn,
    .product-card .wishlist-button,
    .product-card .wishlist {

        top: 10px !important;

        right: 10px !important;

    }

}


/* ============================================================
   VERY SMALL MOBILE
============================================================ */

@media (max-width: 360px) {

    .product-image {

        height: 220px;

    }


    .hover-product-name {

        font-size: 12px;

    }


    .hover-price strong {

        font-size: 14px;

    }


    .hover-actions button {

        min-height: 28px;

        font-size: 7px;

    }

}


/* ============================================================
   TOUCH DEVICES
============================================================ */

@media (hover: none) and (pointer: coarse) {

    /*
       Mobile/tablet par traditional hover available nahi hota.
       Isliye image tap/interaction ko clean rakha gaya hai.
    */

    .product-hover-overlay {

        transition:
            opacity .25s ease;

    }


    .product-card:hover {

        transform: none;

    }


    .product-card:hover
    .product-image img {

        transform: none;

    }

}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

    .product-card,
    .product-image img,
    .product-hover-overlay,
    .hover-actions button {

        transition: none !important;

    }

}