/* ═══════════════════════════════════════════
   SORIVAS SERVICE IT SRL — Shop / Catalog
   ═══════════════════════════════════════════ */

/* ─── ASTRA RESET ─── */
body.sorivas-dark-shop .site-content,
body.sorivas-dark-shop #primary,
body.sorivas-dark-shop #content,
body.sorivas-dark-shop .ast-container {
    background-color: var(--srv-bg-main) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

body.sorivas-dark-shop .woocommerce-result-count,
body.sorivas-dark-shop .woocommerce-ordering,
body.sorivas-dark-shop .woocommerce-breadcrumb,
body.sorivas-dark-shop .ast-woocommerce-container,
body.sorivas-dark-shop .woocommerce-products-header {
    display: none !important;
}

/* ─── WRAPPER ─── */
#sorivas-shop-page {
    padding-top: var(--srv-navbar-total);
    min-height: 100vh;
    background: var(--srv-bg-main);
}

.srv-shop-container {
    max-width: var(--srv-container-max);
    margin: 0 auto;
    padding: 0 var(--srv-container-px) clamp(60px, 8vw, 120px);
}


/* ═══════════════════════════════════════════
   SHOP HERO
   ═══════════════════════════════════════════ */

.srv-shop-hero {
    position: relative;
    background: var(--srv-bg-dark);
    padding: calc(var(--srv-navbar-total) + 48px) clamp(24px, 5vw, 80px) clamp(50px, 7vw, 80px);
    overflow: hidden;
}

.srv-shop-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--srv-primary);
    filter: blur(160px);
    opacity: .12;
    top: -120px;
    right: -80px;
}

.srv-shop-hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.srv-shop-hero-title {
    font-family: var(--srv-font-heading);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.srv-shop-hero-desc {
    font-size: .92rem;
    color: rgba(255, 255, 255, .65);
    font-weight: 300;
    line-height: 1.6;
}


/* ═══════════════════════════════════════════
   LAYOUT: sidebar + main
   ═══════════════════════════════════════════ */

.srv-shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(28px, 3vw, 48px);
    align-items: flex-start;
    padding-top: clamp(36px, 5vw, 56px);
}


/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */

.srv-shop-sidebar {
    position: sticky;
    top: 160px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    background: var(--srv-card-bg);
    border-radius: var(--srv-radius-lg);
    padding: clamp(20px, 3vw, 28px);
    border: 1.5px solid var(--srv-border);
}

.srv-sidebar-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.srv-sidebar-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--srv-muted);
}

/* Search */
.srv-shop-search-wrap {
    position: relative;
}

.srv-shop-search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--srv-muted);
    pointer-events: none;
}

.srv-shop-search {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--srv-border);
    border-radius: var(--srv-radius-md);
    background: var(--srv-bg-white);
    font-family: var(--srv-font-body);
    font-size: .85rem;
    color: var(--srv-ink);
    transition: border-color var(--srv-transition);
    outline: none;
}

.srv-shop-search::placeholder {
    color: var(--srv-muted);
    opacity: .6;
}

.srv-shop-search:focus {
    border-color: var(--srv-secondary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.12);
    background: rgba(0, 212, 170, 0.03);
}

/* Category Filters */
.srv-filter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.srv-shop-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: var(--srv-radius-sm);
    background: transparent;
    font-family: var(--srv-font-body);
    font-size: .84rem;
    font-weight: 500;
    color: var(--srv-muted);
    cursor: pointer;
    transition: all var(--srv-transition);
    text-align: left;
    width: 100%;
}

.srv-shop-filter-btn:hover {
    background: var(--srv-bg-main);
    color: var(--srv-ink);
}

.srv-shop-filter-btn.is-active {
    background: var(--srv-primary);
    color: var(--srv-text-on-dark);
    font-weight: 600;
}


/* ═══════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════ */

.srv-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
}
.srv-shop-toolbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--srv-secondary), transparent);
    opacity: 0.3;
}

.srv-shop-count {
    font-size: .82rem;
    color: var(--srv-muted);
    font-weight: 400;
}

.srv-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.srv-sort-label {
    font-size: .78rem;
    color: var(--srv-muted);
    font-weight: 500;
}

.srv-sort-select {
    padding: 8px 14px;
    border: 1.5px solid var(--srv-border);
    border-radius: var(--srv-radius-sm);
    background: var(--srv-bg-white);
    font-family: var(--srv-font-body);
    font-size: .82rem;
    color: var(--srv-ink);
    cursor: pointer;
    outline: none;
    transition: border-color var(--srv-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230A66C2' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.srv-sort-select:focus {
    border-color: var(--srv-secondary);
}


/* ═══════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════ */

.srv-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ─── Product Card ─── */
.srv-product-card {
    display: flex;
    flex-direction: column;
    background: var(--srv-card-bg);
    border-radius: var(--srv-radius-lg);
    border: 1.5px solid var(--srv-border);
    overflow: hidden;
    color: inherit;
    transition: all .45s var(--srv-ease);
}

.srv-product-card:hover {
    transform: translateY(-5px);
    border-color: var(--srv-primary);
    box-shadow: var(--srv-shadow-lg);
}

/* Card link area (thumb + body) */
.srv-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

/* Thumbnail */
.srv-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--srv-bg-main);
}

.srv-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--srv-ease);
}

.srv-product-card:hover .srv-card-thumb img {
    transform: scale(1.05);
}

.srv-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--srv-muted);
}

/* Card Body */
.srv-card-body {
    padding: 20px 22px 0;
    flex: 1;
}

.srv-card-cat {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--srv-primary);
    margin-bottom: 8px;
}

.srv-card-title {
    font-family: var(--srv-font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--srv-ink);
    margin-bottom: 6px;
}

.srv-card-desc {
    font-size: .82rem;
    color: var(--srv-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* Card Footer */
.srv-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px 20px;
}

.srv-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 600;
}

.srv-badge-price {
    background: var(--srv-bg-main);
    color: var(--srv-primary);
}

.srv-badge-config {
    background: var(--srv-bg-main);
    color: var(--srv-secondary);
}

.srv-badge-quote {
    background: var(--srv-bg-main);
    color: var(--srv-accent);
}

/* ─── ACTION BUTTONS ─── */
.srv-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-family: var(--srv-font-body);
    transition: all .3s var(--srv-ease);
    text-decoration: none;
}

/* Cart icon button (fixed price) */
.srv-card-action--cart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--srv-primary) !important;
    color: var(--srv-text-on-dark);
    padding: 0;
    flex-shrink: 0;
}
.srv-card-action--cart svg {
    width: 16px !important;
    height: 16px !important;
    max-width: none !important;
    flex-shrink: 0;
    display: block;
}
.srv-card-action--cart:hover {
    background: var(--srv-primary-hover) !important;
    transform: scale(1.1);
}
.srv-card-action--cart:disabled {
    opacity: .7;
    cursor: wait;
}
.srv-card-action--success {
    background: var(--srv-success, #10B981) !important;
}

/* Text button (variable / quote) */
.srv-card-action--text {
    padding: 6px 14px;
    border-radius: 50px;
    background: transparent;
    border: 1.5px solid var(--srv-border) !important;
    font-size: .76rem;
    font-weight: 600;
    color: var(--srv-ink2);
}
.srv-card-action--text:hover {
    border-color: var(--srv-primary) !important;
    color: var(--srv-primary);
    background: rgba(10, 102, 194, 0.05);
}

/* Spinner animation */
@keyframes srv-spin-anim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.srv-spin { animation: srv-spin-anim .8s linear infinite; }


/* ─── VIEW TOGGLE ─── */
.srv-view-toggle {
    display: flex;
    gap: 4px;
    margin-left: 12px;
}
.srv-view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--srv-border) !important;
    border-radius: var(--srv-radius-sm);
    background: var(--srv-bg-white) !important;
    color: var(--srv-ink2);
    cursor: pointer;
    transition: all var(--srv-transition) var(--srv-ease);
    padding: 0;
}
.srv-view-btn svg {
    width: 18px !important;
    height: 18px !important;
    max-width: none !important;
    flex-shrink: 0;
    display: block;
}
.srv-view-btn:hover { color: var(--srv-primary); border-color: var(--srv-primary) !important; background: var(--srv-bg-white) !important; }
.srv-view-btn.is-active {
    background: var(--srv-primary) !important;
    color: var(--srv-text-on-dark);
    border-color: var(--srv-primary) !important;
}

/* ─── LIST VIEW MODE ─── */
.srv-shop-grid.srv-list-view {
    grid-template-columns: 1fr !important;
}
.srv-shop-grid.srv-list-view .srv-product-card {
    flex-direction: row;
    align-items: center;
}
.srv-shop-grid.srv-list-view .srv-card-link {
    flex-direction: row;
    align-items: center;
    flex: 1;
}
.srv-shop-grid.srv-list-view .srv-card-thumb {
    width: 120px;
    min-width: 120px;
    height: 100%;
    border-radius: var(--srv-radius-lg) 0 0 var(--srv-radius-lg);
}
.srv-shop-grid.srv-list-view .srv-card-body {
    flex: 1;
    padding: 20px 24px;
}
.srv-shop-grid.srv-list-view .srv-card-foot {
    padding: 0 24px 20px;
    justify-content: flex-start;
    gap: 12px;
}

/* ─── FILTER COUNT BADGE ─── */
.srv-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(10, 102, 194, 0.08);
    color: var(--srv-primary);
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
    font-family: var(--srv-font-mono);
}
.srv-shop-filter-btn.is-active .srv-filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--srv-text-on-dark);
}

/* ─── SIDEBAR CTA ─── */
.srv-sidebar-cta {
    background: linear-gradient(135deg, var(--srv-primary-dark), var(--srv-primary));
    border-radius: var(--srv-radius-lg);
    padding: 24px;
    text-align: center;
}
.srv-sidebar-cta-title {
    font-family: var(--srv-font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--srv-text-on-dark);
    margin-bottom: 8px;
}
.srv-sidebar-cta-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 16px;
}
.srv-sidebar-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--srv-accent);
    color: var(--srv-text-on-dark);
    border-radius: var(--srv-radius-md);
    font-family: var(--srv-font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--srv-transition) var(--srv-ease);
}
.srv-sidebar-cta-btn:hover {
    background: var(--srv-accent-hover);
    transform: translateY(-2px);
}

/* ─── FADE IN ANIMATION ─── */
.srv-product-card.srv-fade-in {
    animation: srv-fadeInProduct 0.5s var(--srv-ease) forwards;
}
@keyframes srv-fadeInProduct {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */

.srv-shop-empty {
    text-align: center;
    padding: clamp(60px, 8vw, 100px) 24px;
}

.srv-empty-ico {
    color: var(--srv-muted);
    margin-bottom: 20px;
}

.srv-empty-title {
    font-family: var(--srv-font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--srv-ink);
    margin-bottom: 8px;
}

.srv-empty-desc {
    font-size: .9rem;
    color: var(--srv-muted);
    font-weight: 300;
    margin-bottom: 24px;
}

.srv-empty-reset {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 60px;
    border: 1.5px solid var(--srv-border);
    background: transparent;
    font-family: var(--srv-font-body);
    font-size: .86rem;
    font-weight: 600;
    color: var(--srv-primary);
    cursor: pointer;
    transition: all .35s;
}

.srv-empty-reset:hover {
    background: var(--srv-primary);
    color: #fff;
    border-color: var(--srv-primary);
}


/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */

.srv-shop-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 50px;
}

.srv-shop-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--srv-radius-sm);
    font-family: var(--srv-font-body);
    font-size: .88rem;
    font-weight: 500;
    color: var(--srv-ink2);
    background: var(--srv-card-bg);
    border: 1.5px solid var(--srv-border);
    text-decoration: none;
    transition: all var(--srv-transition);
}

.srv-shop-pagination .page-numbers:hover {
    border-color: var(--srv-primary);
    color: var(--srv-primary);
}

.srv-shop-pagination .page-numbers.current {
    background: var(--srv-primary);
    color: var(--srv-text-on-dark);
    border-color: var(--srv-primary);
}


/* ═══ MOBILE ═══ */
@media (max-width: 921px) {
    .srv-shop-layout {
        grid-template-columns: 1fr;
    }

    .srv-shop-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .srv-sidebar-block {
        flex: 1;
        min-width: 200px;
    }

    .srv-filter-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .srv-shop-filter-btn {
        padding: 8px 14px;
        border-radius: 50px;
        font-size: .78rem;
        width: auto;
    }
}

@media (max-width: 768px) {
    #sorivas-shop-page {
        padding-top: var(--srv-navbar-total);
    }

    .srv-shop-hero {
        padding-top: var(--srv-navbar-total);
    }

    .srv-shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .srv-shop-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .srv-shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══ DESKTOP MARE ═══ */
@media (min-width: 1400px) {
    .srv-shop-container {
        max-width: 1400px;
    }

    .srv-shop-layout {
        grid-template-columns: 300px 1fr;
    }
}
