﻿.shop-page-wrapper .section-divider {
    margin: 30px 0 10px;
    border-top: 1px solid #e5e7eb;
}

.shop-page-wrapper .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: #222;
    margin-bottom: 22px;
}

    .shop-page-wrapper .section-title::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #eee;
        margin-left: 10px;
    }

.shop-page-wrapper .section-icon {
    font-size: 18px;
}

.shop-page-wrapper .search-box {
    max-width: 500px;
}

.shop-page-wrapper .search-input {
    border-radius: 30px;
    padding: .75rem 1rem;
}

/* =========================
   CATEGORY GRID
========================= */

.shop-page-wrapper .category-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
    margin-top: 16px;
}

/* Card */
.shop-page-wrapper .category-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 1px solid #eee;
    transition: .25s ease;
}

    .shop-page-wrapper .category-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,.08);
    }

        .shop-page-wrapper .category-card:hover .cat-img img {
            transform: scale(1.04);
        }

/* Image */
.shop-page-wrapper .cat-img {
    width: 100%;
    aspect-ratio: 1 / 0.72;
    overflow: hidden;
}

    .shop-page-wrapper .cat-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: .3s;
    }

/* Body */
.shop-page-wrapper .cat-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* Title */
.shop-page-wrapper .cat-title {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

/* Count */
.shop-page-wrapper .cat-count {
    font-size: 11px;
    color: #888;
    line-height: 1;
}

/* CTA */
.shop-page-wrapper .cat-cta {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    line-height: 1;
}

/* Colors */
.shop-page-wrapper .category-card.plants .cat-title {
    color: #2e7d32;
}

.shop-page-wrapper .category-card.seeds .cat-title {
    color: #f9a825;
}

.shop-page-wrapper .category-card.tools .cat-title {
    color: #1565c0;
}

.shop-page-wrapper .category-card.pots .cat-title {
    color: #6a1b9a;
}

/* =========================
   PRODUCT GRID
========================= */
.shop-page-wrapper .product-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px;
}

.shop-page-wrapper .product-card
{
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
    transition: .25s ease;
}

    .shop-page-wrapper .product-card:hover
    {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0,0,0,.10);
    }

    .shop-page-wrapper .product-card:active
    {
        transform: scale(.98);
    }

    .shop-page-wrapper .product-card a
    {
        text-decoration: none;
        color: inherit;
    }

.shop-page-wrapper .product-img-wrapper {
    position: relative;
    overflow: hidden;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.shop-page-wrapper .product-img {
    width: 100%;
    aspect-ratio: 1 / 0.58;
    object-fit: cover;
    transition: .3s;
}

.shop-page-wrapper .product-card:hover .product-img {
    transform: scale(1.05);
}

.shop-page-wrapper .product-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

.shop-page-wrapper .product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    min-height: auto;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.shop-page-wrapper .rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 1px 0;
    line-height: 1;
}

.shop-page-wrapper .rating-count {
    font-size: 12px;
    color: #666;
}

.shop-page-wrapper .plant-type {
    font-size: 11px;
    color: #888;
    margin: 2px 0;
}

.shop-page-wrapper .bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    gap: 8px;
}

.shop-page-wrapper .product-price {
    font-size: 16px;
    font-weight: 700;
    color: #2e7d32;
}

.shop-page-wrapper .seller-row {
    font-size: 10px;
    color: #777;
    max-width: 100%;
    white-space: normal; /* 🔥 change */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 🔥 max 2 lines */
    -webkit-box-orient: vertical;
}

    .shop-page-wrapper .seller-row a {
        color: #2e7d32;
        font-weight: 600;
        text-decoration: none;
    }

.shop-page-wrapper .seller-city {
    font-size: 9px;
    color: #999;
}

/* =========================
   BADGES / BUTTONS
========================= */
.shop-page-wrapper .badge-new {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff5722;
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    z-index: 3;
}

.shop-page-wrapper .wishlist-btn,
.shop-page-wrapper .view-btn {
    position: absolute;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    z-index: 3;
}

.shop-page-wrapper .wishlist-btn {
    top: 8px;
    right: 8px;
}

.shop-page-wrapper .view-btn {
    top: 42px;
    left: 8px;
}

/* =========================
   STARS
========================= */
.shop-page-wrapper .stars {
    position: relative;
    display: inline-block;
    font-size: 14px;
    color: #ddd;
}

    .shop-page-wrapper .stars::before {
        content: "★★★★★";
    }

.shop-page-wrapper .stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #ffc107;
}

    .shop-page-wrapper .stars-fill::before {
        content: "★★★★★";
    }

 .img-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0,0,0,.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

   .img-modal.show {
        display: flex;
    }

.img-modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 10px;
    object-fit: contain;
}

 .img-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 100000;
}

/* =========================
   DESKTOP
========================= */
@media (min-width:768px) {
    .shop-page-wrapper .product-grid {
        grid-template-columns: repeat(4,1fr);
    }

    .shop-page-wrapper .category-grid {
        grid-template-columns: repeat(4,1fr);
    }
}

@media (max-width:768px) {

    .shop-page-wrapper .category-grid {
        gap: 10px;
    }

    .shop-page-wrapper .cat-img {
        aspect-ratio: 1 / 0.62;
    }

    .shop-page-wrapper .cat-body {
        padding: 8px;
    }

    .shop-page-wrapper .cat-title {
        font-size: 13px;
    }

    .shop-page-wrapper .cat-count {
        font-size: 10px;
    }

    .shop-page-wrapper .cat-cta {
        font-size: 11px;
        margin-top: 2px;
    }
}


/* =========================
   MOBILE
========================= */
@media (max-width:768px) {

    .shop-page-wrapper .section-title {
        font-size: 16px;
    }

    .shop-page-wrapper .search-box {
        flex-direction: column;
    }

        .shop-page-wrapper .search-box button {
            width: 100%;
            margin-left: 0 !important;
            margin-top: 8px;
        }

    .shop-page-wrapper .product-grid {
        gap: 10px;
    }

    .shop-page-wrapper .product-card {
        border-radius: 14px;
    }

    .shop-page-wrapper .product-img {
        aspect-ratio: 1 / 0.72;
    }

    .shop-page-wrapper .product-body {
        padding: 6px;
    }

    .shop-page-wrapper .product-title {
        font-size: 13px;
        min-height: auto;
        margin-bottom: 1px;
        line-height: 1.2;
    }

    .shop-page-wrapper .bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .shop-page-wrapper .product-price {
        font-size: 14px;
    }

    .shop-page-wrapper .wishlist-btn,
    .shop-page-wrapper .view-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .shop-page-wrapper .view-btn {
        top: 38px;
    }

    .shop-page-wrapper .badge-new {
        font-size: 10px;
        padding: 3px 6px;
    }

    .shop-page-wrapper .seller-row {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }

    .shop-page-wrapper .plant-type {
        font-size: 10px;
        margin-bottom: 4px;
    }

    /* rating tighter */
    .shop-page-wrapper .rating-row {
        gap: 2px;
        margin-top: 0;
        margin-bottom: 1px;
    }
}
