/* ============================================================
   VIVA Shop Page – v2 (matches original hire-products layout)
   ============================================================ */

/* ── Banner ──────────────────────────────────────────────── */
.viva-shop-banner {
    background: #f0edf6;
    padding: 50px 60px;
}

.viva-shop-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1d;
    margin: 0;
}

/* ── Page Layout ─────────────────────────────────────────── */
.viva-shop-wrap {
    display: flex;
    gap: 0;
    min-height: 60vh;
    max-width: 100%;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.viva-shop-sidebar {
    width: 200px;
    min-width: 200px;
    border-right: 1px solid #e8e8e8;
    padding: 30px 20px;
    background: #fff;
}

.viva-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.viva-cat-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.viva-cat-list li a {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1d;
    text-decoration: none;
    flex: 1;
    transition: color 0.2s;
}

.viva-cat-list li a:hover,
.viva-cat-list li.active a {
    color: #7c5cbf;
}

.viva-cat-plus {
    font-size: 18px;
    color: #aaa;
    margin-left: 6px;
    font-weight: 300;
    line-height: 1;
}

/* ── Main Grid ───────────────────────────────────────────── */
.viva-shop-main {
    flex: 1;
    padding: 30px 40px;
    min-width: 0;
}

/* Override WC ul.products to 4-column grid */
.viva-shop-main ul.products,
.woocommerce .viva-shop-main ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.viva-shop-main ul.products li.product,
.woocommerce .viva-shop-main ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
    clear: none !important;
}

/* ── Product Card ─────────────────────────────────────────── */
.viva-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.viva-product-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

/* Images */
.viva-product-card__images {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
    flex-shrink: 0;
    text-decoration: none;
}

.viva-product-card__img {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.viva-product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
    display: block;
}

.viva-product-card__img--hover { opacity: 0; }

.viva-product-card:hover .viva-product-card__img--primary { opacity: 0; }
.viva-product-card:hover .viva-product-card__img--hover   { opacity: 1; }

/* Card body */
.viva-product-card__body {
    padding: 12px 14px 6px;
    flex: 1;
}

.viva-product-card__name {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1d1d1d;
    text-decoration: none;
    line-height: 1.35;
    margin: 0 0 4px;
}

.viva-product-card__name:hover { color: #555; }

.viva-product-card__sub {
    font-size: 0.78rem;
    color: #888;
    margin: 0;
    line-height: 1.35;
}

/* Price */
.viva-product-card__action .price,
.viva-product-card .price {
    display: none !important; /* Price on Request shown via viva-poa */
}

.viva-poa {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
    display: block;
    padding: 4px 14px 0;
}

/* Action area */
.viva-product-card__action {
    padding: 8px 12px 14px;
}

/* Add to Quote button */
.viva-atq-btn,
a.viva-atq-btn,
.viva-atq-btn.button,
.viva-product-card__action a.button {
    display: block !important;
    width: 100% !important;
    padding: 10px 12px !important;
    background: #1d1d1d !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background 0.25s ease !important;
    box-sizing: border-box !important;
    letter-spacing: 0.02em !important;
}

.viva-atq-btn:hover,
a.viva-atq-btn:hover,
.viva-product-card__action a.button:hover {
    background: #444 !important;
    color: #fff !important;
}

/* WooCommerce result count + ordering bar */
.woocommerce-result-count {
    font-size: 13px;
    color: #888;
    margin: 0 0 16px;
}

.woocommerce-ordering { display: none; } /* hide sort dropdown */

/* ── Pagination ──────────────────────────────────────────── */
.woocommerce nav.woocommerce-pagination {
    margin-top: 30px;
}

.woocommerce nav.woocommerce-pagination ul {
    display: flex;
    gap: 6px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    font-size: 13px;
    text-decoration: none;
    color: #1d1d1d;
    transition: all 0.2s;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: #1d1d1d;
    color: #fff;
    border-color: #1d1d1d;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    .viva-shop-main ul.products,
    .woocommerce .viva-shop-main ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 860px) {
    .viva-shop-wrap { flex-direction: column; }
    .viva-shop-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        padding: 20px;
    }
    .viva-cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
    .viva-cat-list li {
        border: 1px solid #e0e0e0;
        border-radius: 50px;
        padding: 6px 14px;
        background: #fff;
    }
    .viva-cat-plus { display: none; }
    .viva-shop-main { padding: 20px; }
    .viva-shop-main ul.products,
    .woocommerce .viva-shop-main ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .viva-shop-banner { padding: 30px 20px; }
    .viva-shop-main ul.products,
    .woocommerce .viva-shop-main ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}
