/*
Theme Name: Blocksy Child
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/

/* =========================================
   Product Detail Page  (single-products.php)
   Colour mapping against this site's palette:
     color-1 #2872fa  — brand blue  (CTA, accent)
     color-2 #1559ed  — dark blue   (hover)
     color-3 #3A4F66  — blue-gray   (body text, labels)
     color-4 #192a3d  — dark navy   (headings, bold values)
     color-5 #e1e8ed  — light gray  (borders)
     color-6 #f2f5f7  — near-white  (subtle bg)
     color-8 #ffffff  — white
   ========================================= */

.syc-product-page {
    padding-top: clamp(2rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* Back to Products link */
.syc-back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: var(--theme-font-size-small, 0.8125rem);
    color: var(--theme-palette-color-3, #3a4f66);
    text-decoration: none;
    transition: color 0.15s ease;
}

.syc-back-link:hover {
    color: var(--theme-palette-color-1, #2872fa);
    text-decoration: none;
}

/* Two-column layout: image | summary — 55 / 45 split */
.syc-product-detail {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

@media (max-width: 768px) {
    .syc-product-detail {
        grid-template-columns: 1fr;
    }
}

/* Gallery */
.syc-product-gallery {
    position: sticky;
    top: calc(var(--theme-header-height, 0px) + 2rem);
    /* Grid items default to min-width:auto; combined with aspect-ratio inside,
       this causes a cyclic layout and Swiper reads a max-fallback width
       (~16777216px). Force min-width:0 to break the cycle. */
    min-width: 0;
}

.syc-product-image {
    width: 100%;
    height: auto;
    border-radius: var(--theme-border-radius, 6px);
    display: block;
}

.syc-product-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--theme-palette-color-6, #f2f5f7);
    border-radius: var(--theme-border-radius, 6px);
}

/* Multi-image Swiper gallery
   Note: Swiper's bundled CSS sets `.swiper-slide { height: 100%; }`, which
   overrides aspect-ratio on slides. So aspect-ratio goes on the container
   (main) and slides override height to auto (thumbs). */
.syc-gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 0.75rem;
    border-radius: var(--theme-border-radius, 6px);
    overflow: hidden;
    background: var(--theme-palette-color-6, #f2f5f7);
    --swiper-navigation-size: 16px;
    --swiper-navigation-color: var(--theme-palette-color-1, #2872fa);
}

/* Navigation arrows — circular button overlay, brand blue arrow */
.syc-gallery-main .swiper-button-prev,
.syc-gallery-main .swiper-button-next {
    width: 38px;
    height: 38px;
    margin-top: -19px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(25, 42, 61, 0.08);
}

.syc-gallery-main .swiper-button-prev {
    left: 12px;
}

.syc-gallery-main .swiper-button-next {
    right: 12px;
}

.syc-gallery-main .swiper-button-prev:hover,
.syc-gallery-main .swiper-button-next:hover {
    background: #fff;
    box-shadow: 0 2px 6px rgba(25, 42, 61, 0.16);
}

.syc-gallery-main .swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

.syc-gallery-thumbs {
    width: 100%;
}

.syc-gallery-main .swiper-slide {
    background: var(--theme-palette-color-6, #f2f5f7);
}

.syc-gallery-main .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.syc-gallery-thumbs .swiper-slide {
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: var(--theme-border-radius, 6px);
    overflow: hidden;
    background: var(--theme-palette-color-6, #f2f5f7);
    cursor: pointer;
    opacity: 0.55;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.syc-gallery-thumbs .swiper-slide:hover {
    opacity: 0.85;
}

.syc-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--theme-palette-color-1, #2872fa);
}

.syc-gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Summary column */
.syc-product-summary {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ACF: product_name — eyebrow (brand blue accent) */
.syc-eyebrow {
    margin: 0;
    font-size: var(--theme-font-size-small, 0.8125rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--theme-palette-color-1, #2872fa);
}

/* Post title */
.syc-product-title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.2;
    color: var(--theme-palette-color-4, #192a3d);
}

/* ACF: description */
.syc-description {
    line-height: 1.75;
    color: var(--theme-palette-color-3, #3a4f66);
    padding-bottom: 0.25rem;
}

.syc-description p:last-child { margin-bottom: 0; }

/* Spec table */
.syc-specs {
    border-top: 1px solid var(--theme-palette-color-5, #e1e8ed);
    padding-top: 1.25rem;
}

.syc-specs__heading {
    margin: 0 0 0.75rem;
    font-size: var(--theme-font-size-small, 0.8125rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-palette-color-3, #3a4f66);
}

.syc-specs__list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.syc-specs__row {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--theme-palette-color-5, #e1e8ed);
    align-items: baseline;
}

.syc-specs__label {
    font-size: var(--theme-font-size-small, 0.8125rem);
    color: var(--theme-palette-color-3, #3a4f66);
    font-weight: 500;
}

.syc-specs__value {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--theme-palette-color-4, #192a3d);
}

@media (max-width: 480px) {
    .syc-specs__row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

/* CTA button — brand blue */
.syc-cta {
    padding-top: 0.5rem;
}

.syc-cta__btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--theme-palette-color-1, #2872fa);
    color: var(--theme-palette-color-8, #ffffff);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: var(--theme-border-radius, 6px);
    transition: background-color 0.2s ease;
}

.syc-cta__btn:hover,
.syc-cta__btn:focus-visible {
    background-color: var(--theme-palette-color-2, #1559ed);
    color: var(--theme-palette-color-8, #ffffff);
    text-decoration: none;
}

/* =========================================
   Related Products
   ========================================= */

.syc-related {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--theme-palette-color-5, #e1e8ed);
}

.syc-related__heading {
    margin: 0 0 1.75rem;
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--theme-palette-color-4, #192a3d);
}

.syc-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .syc-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .syc-related__grid {
        grid-template-columns: 1fr;
    }
}

.syc-related__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: var(--theme-border-radius, 6px);
    overflow: hidden;
    background-color: var(--theme-palette-color-8, #ffffff);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.syc-related__card:hover {
    box-shadow: 0 4px 16px rgba(40, 114, 250, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
}

.syc-related__img-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--theme-palette-color-6, #f2f5f7);
}

.syc-related__img-wrap--empty {
    background-color: var(--theme-palette-color-6, #f2f5f7);
}

.syc-related__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.syc-related__card:hover .syc-related__img {
    transform: scale(1.04);
}

.syc-related__info {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.syc-related__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-palette-color-4, #192a3d);
    line-height: 1.35;
}

.syc-related__link {
    font-size: var(--theme-font-size-small, 0.8125rem);
    color: var(--theme-palette-color-1, #2872fa);
    margin-top: auto;
}

/* =========================================
   Product Archive  (archive-products.php / page-products-2.php)
   ========================================= */

.syc-archive {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-top: clamp(2rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* Category filter bar */
.syc-archive__filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.syc-archive__filter-btn {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: 2rem;
    font-size: var(--theme-font-size-small, 0.8125rem);
    font-weight: 500;
    color: var(--theme-palette-color-3, #3a4f66);
    text-decoration: none;
    background-color: var(--theme-palette-color-8, #ffffff);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.syc-archive__filter-btn:hover,
.syc-archive__filter-btn.is-active {
    background-color: var(--theme-palette-color-1, #2872fa);
    border-color: var(--theme-palette-color-1, #2872fa);
    color: var(--theme-palette-color-8, #ffffff);
    text-decoration: none;
}

/* Product grid */
.syc-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .syc-archive__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .syc-archive__grid {
        grid-template-columns: 1fr;
    }
}

/* Product card */
.syc-archive__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: var(--theme-border-radius, 6px);
    overflow: hidden;
    background-color: var(--theme-palette-color-8, #ffffff);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.syc-archive__card:hover {
    box-shadow: 0 4px 16px rgba(40, 114, 250, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
}

.syc-archive__img-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--theme-palette-color-6, #f2f5f7);
}

.syc-archive__img-wrap--empty {
    background-color: var(--theme-palette-color-6, #f2f5f7);
}

.syc-archive__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.syc-archive__card:hover .syc-archive__img {
    transform: scale(1.04);
}

.syc-archive__card-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.syc-archive__cat {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--theme-palette-color-1, #2872fa);
    font-weight: 500;
}

.syc-archive__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-palette-color-4, #192a3d);
    line-height: 1.35;
}

.syc-archive__link {
    font-size: var(--theme-font-size-small, 0.8125rem);
    color: var(--theme-palette-color-3, #3a4f66);
    margin-top: auto;
    padding-top: 0.5rem;
}

.syc-archive__card:hover .syc-archive__link {
    color: var(--theme-palette-color-1, #2872fa);
}

/* Empty state */
.syc-archive__empty {
    color: var(--theme-palette-color-3, #3a4f66);
    padding: 3rem 0;
    text-align: center;
}

/* =============================================
   Contact Page
   ============================================= */

.syc-contact-heading {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.wpforms-container,
form.wpforms-form {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    float: none !important;
}

.wpforms-field input,
.wpforms-field textarea,
.wpforms-field select {
    border-color: var(--theme-palette-color-5, #e1e8ed) !important;
    border-width: 2px !important;
}

.wpforms-field input:focus,
.wpforms-field textarea:focus,
.wpforms-field select:focus {
    border-color: var(--theme-palette-color-1, #2872fa) !important;
    outline: none !important;
}

/* =========================================
   About Page — dark column (stk-140ad73)
   Matches stk-3a8e11f: var(--theme-palette-color-4, #131117)
   ========================================= */
.stk-140ad73 {
    background-color: var(--theme-palette-color-4, #131117) !important;
}

.stk-140ad73 .stk-block-heading__text,
.stk-140ad73 .stk-block-text__text,
.stk-140ad73 p {
    color: var(--theme-palette-color-8, #ffffff) !important;
}

/* Pagination */
.syc-archive__pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: clamp(2rem, 5vw, 3rem);
}

.syc-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.6rem;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: var(--theme-border-radius, 6px);
    font-size: var(--theme-font-size-small, 0.8125rem);
    color: var(--theme-palette-color-3, #3a4f66);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.syc-archive__pagination .page-numbers:hover,
.syc-archive__pagination .page-numbers.current {
    background-color: var(--theme-palette-color-1, #2872fa);
    border-color: var(--theme-palette-color-1, #2872fa);
    color: var(--theme-palette-color-8, #ffffff);
    text-decoration: none;
}