/* ══════════════════════════════════════════
   TOTO Shop Page — archive-product.php CSS
   يطابق تماماً الـ screenshot
   ══════════════════════════════════════════ */

/* ── Hero ── */
.toto-shop-hero {
    position: relative;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.toto-shop-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.52);
}
.toto-shop-hero-content {
    position: relative;
    z-index: 1;
    padding: 3rem 1rem;
}
.toto-shop-hero-title {
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 .75rem;
    letter-spacing: .02em;
}
.toto-shop-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-size: .78rem;
    letter-spacing: .1em;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
}
.toto-shop-breadcrumb a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: color .2s;
}
.toto-shop-breadcrumb a:hover { color: #fff; }
.toto-shop-breadcrumb span.sep { opacity: .6; }

/* ── Page Wrapper ── */
.toto-shop-page {
    width: 100%;
}
.toto-shop-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════ */
.toto-shop-sidebar {
    position: sticky;
    top: 100px;
}

/* All Categories Button */
.toto-shop-all-cats-btn {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .85rem 1.2rem;
    background: #0a0a0a;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: background .2s;
}
.toto-shop-all-cats-btn:hover { background: #333; color: #fff; }
.toto-shop-all-cats-btn svg {
    flex-shrink: 0;
}

/* Sidebar Nav */
.toto-shop-sidenav-label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: .75rem;
    padding-bottom: .4rem;
}
.toto-shop-sidenav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.toto-shop-sidenav li {
    border-bottom: 1px solid #e8e8e8;
}
.toto-shop-sidenav li:first-child {
    border-top: 1px solid #e8e8e8;
}
.toto-shop-sidenav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: #0a0a0a;
    text-decoration: none;
    text-transform: uppercase;
    transition: color .15s;
}
.toto-shop-sidenav a:hover { color: #c0272d; }
.toto-shop-sidenav a svg {
    color: #aaa;
    transition: transform .2s, color .15s;
    flex-shrink: 0;
}
.toto-shop-sidenav a:hover svg {
    color: #c0272d;
    transform: translateX(3px);
}
.toto-shop-sidenav li.current-cat a,
.toto-shop-sidenav li.current-cat > a {
    color: #c0272d;
}
.toto-shop-sidenav li.has-children > a svg {
    transform: rotate(0deg);
}
.toto-shop-sidenav li.is-open > a svg {
    transform: rotate(90deg);
    color: #c0272d;
}
/* Arabic / RTL: chevrons point left (←) in shop sidebar */
html[dir="rtl"] .toto-shop-sidenav a svg,
html[lang^="ar"] .toto-shop-sidenav a svg,
body.rtl .toto-shop-sidenav a svg {
    transform: scaleX(-1);
}
html[dir="rtl"] .toto-shop-sidenav a:hover svg,
html[lang^="ar"] .toto-shop-sidenav a:hover svg,
body.rtl .toto-shop-sidenav a:hover svg {
    transform: scaleX(-1) translateX(-3px);
}
html[dir="rtl"] .toto-shop-sidenav li.is-open > a svg,
html[lang^="ar"] .toto-shop-sidenav li.is-open > a svg,
body.rtl .toto-shop-sidenav li.is-open > a svg {
    transform: scaleX(-1) rotate(90deg);
    color: #c0272d;
}

.toto-shop-subcats-wrap {
    padding: .2rem 0 .75rem;
    border-top: 1px dashed #ececec;
    margin-inline-start: 12px;
}
.toto-shop-subcats {
    list-style: none;
    margin: 0;
    padding: 0;
}
.toto-shop-subcats li {
    border-top: 1px solid #f1f1f1;
}
.toto-shop-subcats li:first-child {
    border-top: 1px solid #f1f1f1;
}
.toto-shop-subcats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    padding: .6rem 0;
    text-decoration: none;
    color: #111;
}
.toto-shop-subcat-name {
    flex: 1;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #0a0a0a;
}
.toto-shop-subcats a svg {
    color: #b2b2b2;
    flex-shrink: 0;
}
.toto-shop-subcats a:hover .toto-shop-subcat-name,
.toto-shop-subcats li.current-subcat a .toto-shop-subcat-name {
    color: #c0272d;
}
.toto-shop-subcats a:hover svg,
.toto-shop-subcats li.current-subcat a svg {
    color: #c0272d;
    transform: translateX(3px);
}
html[dir="rtl"] .toto-shop-subcats a svg,
html[lang^="ar"] .toto-shop-subcats a svg,
body.rtl .toto-shop-subcats a svg {
    transform: scaleX(-1);
}
html[dir="rtl"] .toto-shop-subcats a:hover svg,
html[dir="rtl"] .toto-shop-subcats li.current-subcat a svg,
html[lang^="ar"] .toto-shop-subcats a:hover svg,
html[lang^="ar"] .toto-shop-subcats li.current-subcat a svg,
body.rtl .toto-shop-subcats a:hover svg,
body.rtl .toto-shop-subcats li.current-subcat a svg {
    color: #c0272d;
    transform: scaleX(-1) translateX(-3px);
}

/* ════════════════════════════════════
   MAIN CONTENT
   ════════════════════════════════════ */
.toto-shop-main { position: relative; }

/* Toolbar */
.toto-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    gap: 1rem;
    flex-wrap: wrap;
}

/* View Toggle */
.toto-shop-view-toggle {
    display: flex;
    align-items: center;
    gap: .35rem;
}
.toto-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    color: #888;
    transition: all .15s;
    padding: 0;
}
.toto-view-btn:hover,
.toto-view-btn.active {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}
.toto-view-btn svg { display: block; }

/* Toolbar Controls */
.toto-shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.toto-shop-sort-wrap,
.toto-shop-perpage-wrap {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    color: #555;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
}
.toto-shop-sort-wrap label,
.toto-shop-perpage-wrap label {
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .04em;
}
.toto-shop-sort-wrap select,
.toto-shop-perpage-wrap select {
    border: 1px solid #ddd;
    background: #fff;
    padding: .3rem .55rem .3rem .4rem;
    font-size: .78rem;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    color: #0a0a0a;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 1.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .4rem center;
}
.toto-shop-sort-wrap select:focus,
.toto-shop-perpage-wrap select:focus {
    border-color: #0a0a0a;
}

/* ════════════════════════════════════
   PRODUCT GRID
   ════════════════════════════════════ */
.toto-shop-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e5e5e5;
    border: 1px solid #e5e5e5;
}

/* List view override */
.toto-shop-products-grid.view-list {
    grid-template-columns: 1fr;
}
.toto-shop-products-grid.view-2col {
    grid-template-columns: repeat(2, 1fr);
}
.toto-shop-products-grid.view-3col {
    grid-template-columns: repeat(3, 1fr);
}

/* ── Product Card ── */
.toto-shop-prod-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s;
    overflow: hidden;
    padding: 1.25rem 1.1rem 1.4rem;
    position: relative;
}
.toto-shop-prod-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,.09);
    z-index: 1;
    color: inherit;
}

/* Card top info */
.toto-shop-prod-title {
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: .92rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 .65rem;
    line-height: 1.3;
    letter-spacing: .01em;
    min-height: 2.4em;
}

.toto-shop-prod-card-title {
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: .72rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin: -.35rem 0 .75rem;
    line-height: 1.35;
}

.toto-shop-prod-card:has(.toto-shop-prod-card-title) .toto-shop-prod-title {
    margin-bottom: .35rem;
    min-height: 0;
}

.toto-shop-prod-series {
    /* Temporarily hidden — remove this line to restore the category/series label on shop & category cards. */
    display: none;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #0a0a0a;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 0 0 .1rem;
}
.toto-shop-prod-type {
    display: none;
    font-size: .72rem;
    color: #888;
    margin: 0 0 1rem;
}

/* Remote / accessory image */
.toto-shop-prod-remote {
    width: 100%;
    height: 55px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    margin-bottom: .25rem;
    overflow: hidden;
    display: none;
}
.toto-shop-prod-remote img {
    max-height: 52px;
    max-width: 70%;
    object-fit: contain;
    object-position: bottom left;
}

/* Main product image */
.toto-shop-prod-img {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    margin-top: auto;
}
.toto-shop-prod-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
    display: block;
}
.toto-shop-prod-card:hover .toto-shop-prod-img img {
    transform: scale(1.04);
}

.toto-shop-prod-desc {
    display: none !important;
}

/* List view card layout */
.toto-shop-products-grid.view-list .toto-shop-prod-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 0.25rem 1.5rem;
    padding: 1rem 1.5rem;
}
.toto-shop-products-grid.view-list .toto-shop-prod-img {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 120px;
    aspect-ratio: 1/1;
    margin-top: 0;
    align-self: center;
}
.toto-shop-products-grid.view-list .toto-shop-prod-title {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    margin-bottom: 0.25rem;
}
.toto-shop-products-grid.view-list .toto-shop-prod-card-title {
    grid-column: 2;
    grid-row: 2;
    margin: 0 0 .25rem;
}
.toto-shop-products-grid.view-list .toto-shop-prod-remote,
.toto-shop-products-grid.view-list .toto-shop-prod-card > div:not([class]) {
    display: none;
}
.toto-shop-products-grid.view-list .toto-shop-prod-info {
    grid-column: 2;
    grid-row: 2;
}
.toto-shop-products-grid.view-list .toto-shop-prod-card:has(.toto-shop-prod-card-title) .toto-shop-prod-info {
    grid-row: 3;
}
.toto-shop-products-grid.view-list .toto-shop-prod-desc {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    min-width: 0;
}
.toto-shop-products-grid.view-list .toto-shop-prod-card:has(.toto-shop-prod-card-title) .toto-shop-prod-desc {
    grid-row: 4;
}

/* ── No Products ── */
.toto-shop-no-products {
    grid-column: 1 / -1;
    background: #fff;
    text-align: center;
    padding: 4rem 2rem;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    color: #888;
    font-size: 1rem;
}

/* ════════════════════════════════════
   PAGINATION
   ════════════════════════════════════ */
.toto-shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.toto-shop-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .5rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #0a0a0a;
    font-family: 'GothamSSm', 'Helvetica Neue', Arial, sans-serif;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.toto-shop-pagination .page-numbers:hover {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}
.toto-shop-pagination .page-numbers.current {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}
.toto-shop-pagination .page-numbers.dots {
    border: none;
    background: none;
}
.toto-shop-pagination .page-numbers.next,
.toto-shop-pagination .page-numbers.prev {
    font-size: 1rem;
    font-weight: 400;
}

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media (max-width: 1024px) {
    .toto-shop-inner {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
        padding: 2rem 1.5rem 3rem;
    }
    .toto-shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .toto-shop-inner {
        grid-template-columns: 1fr;
    }
    .toto-shop-sidebar {
        position: static;
    }
    .toto-shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .toto-shop-toolbar-right {
        gap: .6rem;
    }
}
@media (max-width: 480px) {
    .toto-shop-products-grid {
        grid-template-columns: 1fr;
    }
    .toto-shop-inner {
        padding: 1.5rem 1rem 2.5rem;
    }
}

/* ════════════════════════════════════
   AJAX LOADING STATE
   ════════════════════════════════════ */
#toto-shop-grid {
    transition: opacity .25s ease;
}

/*
 * Shop grid is replaced via AJAX (shop-ajax.js). Global lazy-image fade in
 * animations.css keeps img[loading="lazy"] at opacity:0 until .toto-img-loaded,
 * but initImageFade() only runs on DOMContentLoaded — so injected images stay invisible.
 */
#toto-shop-grid img[loading="lazy"] {
    opacity: 1;
}
/* Active sidebar cat - يبان أحمر */
.toto-shop-all-cats-btn.active {
    background: #c0272d;
}
.toto-shop-all-cats-btn.active:hover {
    background: #a01f24;
}