/* =========================================================
   PRODUCT INDEX PAGE
========================================================= */

.category-product-track.shop-product-grid {
    display: flex;
    align-items: stretch;
}

/* Category "View All": show every product in wrapping rows. */
.shop-products-area .category-product-viewport-expanded {
    overflow: visible;
}

.shop-products-area .category-product-track.shop-product-grid-expanded {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 14px;
    width: 100%;
    transform: none !important;
    will-change: auto;
}

.shop-products-area .shop-product-grid-expanded > .product-card {
    width: 100% !important;
    min-width: 0;
    height: 100%;
    flex: none !important;
}

@media screen and (max-width: 1100px) {
    .shop-products-area .category-product-track.shop-product-grid-expanded {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 900px) {
    .shop-products-area .category-product-track.shop-product-grid-expanded {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

.shop-products-area .product-index-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
    box-sizing: border-box;
}

.shop-products-area .product-category-name {
    margin-bottom: 2px;
    text-align: center;
}

.shop-products-area .product-index-name {
    margin: 6px 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.shop-products-area .product-index-name a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   PRODUCT RATING — DESKTOP
========================================================= */

.shop-products-area .mobile-product-rating {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    width: 100%;
    margin: 6px 0;
    font-size: 11px;
}

.shop-products-area .mobile-product-rating .filled-star {
    color: #f59e0b;
}

.shop-products-area .mobile-product-rating .empty-star {
    color: #d1d5db;
}

.shop-products-area .mobile-product-rating .rating-count {
    margin-left: 2px;
    color: #6b7280;
    font-size: 10px;
}

/* =========================================================
   PRODUCT PRICE — DESKTOP
========================================================= */

.shop-products-area .mobile-product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.shop-products-area .mobile-current-price {
    color: #2563eb;
    font-size: 15px;
    font-weight: 700;
}

.shop-products-area .mobile-regular-price {
    color: #9ca3af;
    font-size: 12px;
}

/* =========================================================
   PRODUCT BUTTONS — DESKTOP
========================================================= */

.shop-products-area .mobile-product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
    box-sizing: border-box;
}

.shop-products-area .mobile-details-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 5px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 50px;
    color: #2563eb;
    background-color: #eff6ff;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.shop-products-area .mobile-details-button i {
    font-size: 11px;
}

.shop-products-area .mobile-cart-form {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.shop-products-area .mobile-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 32px;
    padding: 5px 8px;
    border: none;
    border-radius: 50px;
    color: #ffffff;
    background-color: #3b82f6;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.shop-products-area .mobile-cart-button i {
    font-size: 11px;
}

.shop-products-area .mobile-cart-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* =========================================================
   SHOP PRODUCT CARD — MOBILE VERSION ONLY
========================================================= */

@media screen and (max-width: 768px) {

    .shop-products-area .category-product-track.shop-product-grid-expanded {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .shop-products-area .product-index-card {
        padding: 8px;
        overflow: hidden;
    }

    .shop-products-area .product-index-name {
        min-height: 28px;
        margin: 5px 0 2px;
        font-size: 11px;
        line-height: 1.25;
    }

    /* Rating */
    .shop-products-area .mobile-product-rating {
        justify-content: center !important;
        flex-wrap: nowrap;
        gap: 2px !important;
        width: 100%;
        margin: 4px 0 5px !important;
        padding: 0;
        white-space: nowrap !important;
    }

    /* Filled and half star */
    .shop-products-area .mobile-product-rating .filled-star {
        color: #f59e0b !important;
    }

    /* Empty star */
    .shop-products-area .mobile-product-rating .empty-star {
        color: #fbbf24 !important;
    }

    .shop-products-area .mobile-product-rating i {
        flex: 0 0 auto;
        font-size: 8px !important;
    }

    .shop-products-area .mobile-product-rating .rating-count {
        flex: 0 0 auto;
        margin-left: 1px !important;
        color: #6b7280 !important;
        font-size: 7px !important;
    }

    /* Price সম্পূর্ণ দেখাবে */
    .shop-products-area .mobile-product-price {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        width: 100% !important;
        margin: 2px 0 7px !important;
        padding: 0;
        white-space: nowrap !important;
        overflow: visible !important;
    }

    .shop-products-area .mobile-current-price {
        flex: 0 1 auto;
        color: #2563eb !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    .shop-products-area .mobile-regular-price {
        flex: 0 1 auto;
        color: #9ca3af !important;
        font-size: 7px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    /* Details উপরে এবং Add To Cart নিচে */
    .shop-products-area .mobile-product-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-end !important;
        gap: 5px !important;
        width: 100% !important;
        margin-top: auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .shop-products-area .mobile-details-button,
    .shop-products-area .mobile-cart-button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 28px !important;
        padding: 3px 4px !important;
        border-radius: 7px !important;
        box-sizing: border-box !important;
        font-size: 8px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    /* Details Button */
    .shop-products-area .mobile-details-button {
        color: #2563eb !important;
        background-color: #eff6ff !important;
        border: 1px solid #93c5fd !important;
    }

    /* Cart Form */
    .shop-products-area .mobile-cart-form {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    /* Add To Cart Button */
    .shop-products-area .mobile-cart-button {
        color: #ffffff !important;
        background-color: #3b82f6 !important;
        border: none !important;
        cursor: pointer !important;
    }

    .shop-products-area .mobile-details-button i,
    .shop-products-area .mobile-cart-button i {
        display: inline-block !important;
        flex: 0 0 auto !important;
        font-size: 8px !important;
    }

    .shop-products-area .mobile-cart-button:disabled {
        opacity: 0.55 !important;
        cursor: not-allowed !important;
    }
}

/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media screen and (max-width: 390px) {

    .shop-products-area .category-product-track.shop-product-grid-expanded {
        grid-template-columns: 1fr !important;
    }

    .shop-products-area .product-index-card {
        padding: 6px;
    }

    .shop-products-area .mobile-current-price {
        font-size: 11px !important;
    }

    .shop-products-area .mobile-regular-price {
        font-size: 6px !important;
    }

    .shop-products-area .mobile-product-rating i,
    .shop-products-area .mobile-product-rating .rating-count {
        font-size: 6px !important;
    }

    .shop-products-area .mobile-details-button,
    .shop-products-area .mobile-cart-button {
        height: 27px !important;
        padding: 3px 2px !important;
        font-size: 7px !important;
    }

    .shop-products-area .mobile-details-button i,
    .shop-products-area .mobile-cart-button i {
        font-size: 7px !important;
    }
}

/* Mobile version-এ Filter Sidebar hide */
@media screen and (max-width: 768px) {
    .shop-page .shop-sidebar {
        display: none !important;
    }

    /* Filter সরানোর পর Product Area পুরো width নেবে */
    .shop-page .shop-content {
        display: block !important;
    }

    .shop-page .shop-products-area {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* PC version — সব Star সোনালি */
@media screen and (min-width: 769px) {
    .shop-products-area .mobile-product-rating .filled-star,
    .shop-products-area .mobile-product-rating .empty-star {
        color: #f59e0b !important;
    }
}
