/* ============================================================
   SPORTSWEAR OF TOMORROW — sot.css
   WHERE: Upload to wp-content/themes/YOUR-ASTRA-CHILD/sot/sot.css
   ============================================================ */

/* ─────────────────────────────────────────────
   GLOBAL TOKENS
───────────────────────────────────────────── */
:root {
    --sot-black:      #0a0a0a;
    --sot-white:      #ffffff;
    --sot-grey-light: #f5f5f3;
    --sot-grey-mid:   #e8e8e5;
    --sot-grey-text:  #777777;
    --sot-radius:     0px;
    --sot-gap:        2px;

    /* Carousel card sizing */
    --sot-card-w:     260px;
    --sot-card-img-h: 320px;
    --sot-header-w:   220px;

    /* Archive grid */
    --sot-cols:       4;
}

/* ─────────────────────────────────────────────
   GLOBAL RESETS (scoped to our elements)
───────────────────────────────────────────── */
.sot-section,
.sot-archive,
.sot-section *,
.sot-archive * {
    box-sizing: border-box;
}

.sot-card-link,
.sot-card-link:hover,
.sot-card-link:visited,
.sot-card-link:focus {
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: none !important;
    outline: none;
}

/* ─────────────────────────────────────────────
   PRODUCTS PAGE — CAROUSEL SECTIONS
───────────────────────────────────────────── */

/* Each category block */
.sot-section {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0;
    margin-bottom: 72px;
    width: 100%;
}

/* LEFT column: title, eyebrow, View All */
.sot-section-header {
    flex: 0 0 var(--sot-header-w) !important;
    width: var(--sot-header-w) !important;
    min-width: var(--sot-header-w) !important;
    padding-right: 32px;
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.sot-eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sot-grey-text);
    margin: 0 0 10px 0 !important;
    font-weight: 400;
    line-height: 1;
}

.sot-section-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--sot-black) !important;
    line-height: 1.2 !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    border: none !important;
    letter-spacing: -0.01em;
}

.sot-view-all {
    font-size: 13px;
    font-weight: 500;
    color: var(--sot-black);
    text-decoration: underline !important;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px !important;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.sot-view-all:hover { opacity: 0.45; }

/* RIGHT: scrollable track */
.sot-track-wrapper {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    position: relative;
}

.sot-track {
    display: flex !important;
    flex-direction: row !important;
    gap: var(--sot-gap);
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    align-items: stretch;
}
.sot-track::-webkit-scrollbar { display: none; }

/* Carousel card */
.sot-card {
    flex: 0 0 var(--sot-card-w) !important;
    width: var(--sot-card-w) !important;
    background: var(--sot-grey-light);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.sot-card:hover { transform: translateY(-2px); }

.sot-card-img-wrap {
    width: 100%;
    height: var(--sot-card-img-h);
    overflow: hidden;
    background: var(--sot-grey-light);
    display: block;
}
.sot-card-img-wrap img.sot-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    transition: transform 0.5s ease;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.sot-card:hover .sot-card-img { transform: scale(1.05); }
.sot-card-img-placeholder {
    width: 100%;
    height: var(--sot-card-img-h);
    background: var(--sot-grey-mid);
}

/* Arrow buttons */
.sot-arrow {
    position: absolute;
    top: calc( var(--sot-card-img-h) / 2 - 20px );
    width: 40px;
    height: 40px;
    background: var(--sot-white);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, background 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    padding: 0;
}
.sot-arrow svg { width: 16px; height: 16px; stroke: var(--sot-black); }
.sot-arrow:hover { background: #f5f5f5; }
.sot-arrow-prev { left: 6px; }
.sot-arrow-next { right: 6px; }

/* Show next arrow when overflowing */
.sot-track-wrapper.has-overflow .sot-arrow-next              { opacity: 1; pointer-events: auto; }
/* Show prev only after scrolling */
.sot-track-wrapper.has-overflow:not(.at-start) .sot-arrow-prev { opacity: 1; pointer-events: auto; }
/* Dim next at end */
.sot-track-wrapper.at-end .sot-arrow-next                    { opacity: 0.2; pointer-events: none; }

/* ─────────────────────────────────────────────
   SHARED CARD INFO (carousel + grid)
───────────────────────────────────────────── */
.sot-card-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 8px 14px;
    gap: 8px;
    background: var(--sot-white);
}
.sot-card-text { flex: 1; min-width: 0; }
.sot-card-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sot-black);
    line-height: 1.35;
    margin-bottom: 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.sot-card-cat {
    display: block;
    font-size: 11px;
    color: var(--sot-grey-text);
    line-height: 1.3;
}
.sot-card-price {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--sot-black);
    white-space: nowrap;
    text-align: right;
    line-height: 1.35;
}
.sot-card-price .woocommerce-Price-amount { font-weight: 500 !important; }
.sot-card-price del { color: var(--sot-grey-text); font-size: 11px; display: block; }
.sot-card-price ins { text-decoration: none; }
.sot-card-price .star-rating,
.sot-card-price .woocommerce-product-rating { display: none !important; }

/* ─────────────────────────────────────────────
   CATEGORY ARCHIVE PAGE — GRID
───────────────────────────────────────────── */

/* Force full width, kill Astra sidebar */
.tax-product_cat .ast-container,
.tax-product_cat #content,
.tax-product_cat #primary,
.tax-product_cat .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}
.tax-product_cat #secondary,
.tax-product_cat .widget-area,
.tax-product_cat .ast-breadcrumbs-wrapper,
.tax-product_cat .woocommerce-products-header,
.tax-product_cat .woocommerce-result-count,
.tax-product_cat .woocommerce-ordering,
.tax-product_cat ul.products {
    display: none !important;
}

/* Archive wrapper */
.sot-archive {
    max-width: 1440px;
    margin: 0 auto;
    padding: 36px 40px 100px;
    background: var(--sot-white);
}

/* Breadcrumb */
.sot-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--sot-grey-text);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.sot-breadcrumb a {
    color: var(--sot-grey-text);
    text-decoration: none;
    transition: color 0.15s;
}
.sot-breadcrumb a:hover { color: var(--sot-black); }
.sot-breadcrumb span { color: var(--sot-grey-text); }
.sot-breadcrumb-current { color: var(--sot-black); font-weight: 500; }

/* Archive header */
.sot-archive-header { margin-bottom: 28px; }
.sot-archive-title {
    font-size: clamp(28px, 3.5vw, 48px) !important;
    font-weight: 700 !important;
    color: var(--sot-black) !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.025em;
    padding: 0 !important;
    border: none !important;
}
.sot-archive-desc {
    font-size: 15px;
    color: #555;
    max-width: 580px;
    line-height: 1.65;
    margin: 0 !important;
}

/* Result count */
.sot-count {
    font-size: 13px;
    color: var(--sot-grey-text);
    margin-bottom: 20px !important;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sot-grey-mid);
}

/* 4-column grid */
.sot-grid {
    display: grid;
    grid-template-columns: repeat( var(--sot-cols), 1fr );
    gap: var(--sot-gap);
}

/* Grid card — no bg, no radius, edge-to-edge images */
.sot-grid-card {
    background: transparent;
    overflow: hidden;
    cursor: pointer;
}
.sot-grid-card:hover .sot-grid-img { transform: scale(1.04); }

.sot-grid-img-wrap {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--sot-grey-light);
    display: block;
}
.sot-grid-img-wrap img.sot-grid-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    transition: transform 0.5s ease;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.sot-grid-img-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--sot-grey-mid);
}

/* Override card-info background for grid (no white strip) */
.sot-grid-card .sot-card-info {
    background: transparent;
    padding: 14px 2px 20px;
}

/* Pagination */
.sot-pagination {
    margin-top: 60px;
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.sot-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 40px;
    font-size: 13px;
    color: var(--sot-black);
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all 0.15s;
}
.sot-pagination .page-numbers.current,
.sot-pagination .page-numbers:hover {
    background: var(--sot-black);
    color: var(--sot-white);
    border-color: var(--sot-black);
}
.sot-no-products {
    font-size: 15px;
    color: var(--sot-grey-text);
    padding: 80px 0;
    text-align: center;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1200px) {
    :root { --sot-card-w: 220px; --sot-card-img-h: 275px; --sot-header-w: 190px; }
    :root { --sot-cols: 3; }
}
@media (max-width: 900px) {
    :root { --sot-card-w: 180px; --sot-card-img-h: 230px; --sot-header-w: 160px; }
    .sot-archive { padding: 28px 24px 80px; }
}
@media (max-width: 700px) {
    /* Carousel: stack vertically on mobile */
    .sot-section {
        flex-direction: column !important;
        gap: 16px;
        margin-bottom: 48px;
    }
    .sot-section-header {
        flex-direction: row !important;
        width: 100% !important;
        min-width: unset !important;
        align-items: flex-end;
        justify-content: space-between;
        padding-right: 0;
        padding-top: 0;
    }
    .sot-eyebrow { display: none; }
    .sot-section-title { margin-bottom: 0 !important; font-size: 18px !important; }
    .sot-arrow { display: none; }

    /* Grid: 2 columns */
    :root { --sot-cols: 2; }
    .sot-archive { padding: 20px 16px 60px; }
    .sot-grid-card .sot-card-info { padding: 10px 2px 14px; }
    .sot-card-name { font-size: 12px; }
    .sot-card-price { font-size: 12px; }
}
