/* ——— شبكة وكروت المتجر (من buying-shell؛ مشترك مع PDP related) ——— */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 20px 0;
    align-items: stretch;
}
@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card-product {
    border: 1px solid #eee;
    border-radius: 15px;
    text-align: center;
    padding: 15px;
    background: #fff;
    transition: 0.3s;
    height: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.card-product > img { width: 100%; height: 180px; object-fit: contain; margin-bottom: 10px; }
.product-card-media-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    flex-shrink: 0;
    overflow: hidden;
    min-height: 0;
}
.product-card-media {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
}
.product-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin-bottom: 0;
    display: block;
}
.product-gallery-thumbs {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    margin-top: 8px;
    margin-bottom: 8px;
    min-height: 48px;
    flex-shrink: 0;
}
.product-gallery-thumbs.is-empty { visibility: hidden; pointer-events: none; }
.product-gallery-thumb {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumb.is-active { border-color: #2563eb; }
.product-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}
.product-card-body .product-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 0.35rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.35em * 2);
}
.product-card-body .product-card-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0 0 0.35rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.35em * 2);
}
.product-card-body .product-card-attrs,
.product-card-body .product-card-stock {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card-body .product-card-price { margin: 0.15rem 0 0; }
.product-card-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
    margin-top: auto;
    align-items: stretch;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.btn-add-cart-store {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
    width: auto;
    padding: 0.55rem 0.35rem;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 900;
    font-size: 0.72rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-add-cart-store:hover { filter: brightness(1.06); }
.btn-buy-now-store {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
    width: auto;
    padding: 0.55rem 0.35rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #fff;
    font-weight: 900;
    font-size: 0.72rem;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
    white-space: nowrap;
    overflow: hidden;
}
.btn-buy-now-store:hover { filter: brightness(1.07); }
.btn-buy-now-store i { font-size: 0.85em; opacity: 0.95; }
.btn-buy-now-store > *,
.btn-add-cart-store > * { pointer-events: none; }
.btn-buy-now-store,
.btn-add-cart-store {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
a.btn-buy-now-store,
a.btn-add-cart-store {
    text-decoration: none;
    box-sizing: border-box;
}
a.product-card-hit {
    text-decoration: none;
    color: inherit;
}
a.product-card-hit:hover { color: inherit; }
a.product-card-hit:hover .product-main-img { opacity: 0.92; }
body.dt-store-clean .card-product {
    border: none;
    border-radius: 22px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
}
body.dt-web-corporate .card-product {
    border-radius: 12px;
    border-color: #e2e8f0;
}
