/**
 * Products Grid — Base styles + Dark variant
 *
 * Base (light): #f6f7ef bg, #1c3a13 text  — used by archive-product.php
 * Dark variant: #1c3a13 bg, #fcfcf7 text  — used by Product Showcase widget
 *
 * @package ZetaTeta
 */

/* ========================================
   PAGE WRAPPER (archive-product.php only)
   ======================================== */
.zt-products-page {
    background-color: #fcfcf7;
    padding-top: 160px;
    padding-bottom: 80px;
}

.zt-products-page__inner {
    max-width: 90rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   GRID
   ======================================== */
.zt-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 auto;
    max-width: 1440px;
    padding: 16px;
}

/* ========================================
   PRODUCT CARD — Base (light theme)
   ======================================== */
.zt-product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    border-radius: 1rem;
    background: #f6f7ef;
    color: #1c3a13;
    padding: 16px;
    height: 375px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zt-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(28, 58, 19, 0.08);
}

/* ========================================
   IMAGE AREA
   ======================================== */
.zt-product-card__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    background-color: transparent;
    border-radius: 16px;
    overflow: hidden;
    flex: 1 0 35%;
    flex-basis: 50%;
}

.zt-product-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.zt-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

/* Badge on image */
.zt-product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 99px;
    background-color: #1c3a13;
    color: #fcfcf7;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    z-index: 2;
}

/* ========================================
   CONTENT AREA
   ======================================== */
.zt-product-card__content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1 1 60%;
    height: auto;
    min-height: 0;
    width: 100%;
    padding: 2rem 0;
    padding-right: 2rem;
}

.zt-product-card__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.zt-product-card__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* SKU Pill */
.zt-product-card__pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px solid rgba(28, 58, 19, 0.15);
    background: transparent;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 500;
    color: #1c3a13;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.zt-product-card__pill sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.25em;
}

/* Title */
.zt-product-card__title {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    color: #1c3a13;
    margin: 0;
    letter-spacing: -0.01em;
}

.zt-product-card__title a {
    color: inherit;
    text-decoration: none;
}

/* Description */
.zt-product-card__desc {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(28, 58, 19, 0.7);
    margin: 0;
}

/* ========================================
   PRICE AREA
   ======================================== */
.zt-product-card__price-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zt-product-card__price-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 99px;
    background-color: #1c3a13;
    color: #fcfcf7;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.zt-product-card__price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zt-product-card__price {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: 500;
    color: #1c3a13;
    margin: 0;
}

.zt-product-card__price--original {
    font-size: 14px;
    font-weight: 400;
    color: rgba(28, 58, 19, 0.5);
    text-decoration: line-through;
}

/* ========================================
   ACTION BUTTONS — Base (light)
   ======================================== */
.zt-product-card__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zt-product-card__btn-learn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #1c3a13;
    color: #fcfcf7;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 99px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.15s ease;
    line-height: 1.3;
}

.zt-product-card__btn-learn:hover {
    background-color: #334e2b;
    transform: scale(1.02);
}

.zt-product-card__btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: transparent;
    color: #1c3a13;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(28, 58, 19, 0.3);
    border: none;
    border-radius: 99px;
    cursor: pointer;
    white-space: nowrap;
    transition: text-decoration-color 0.2s ease, background-color 0.2s ease;
    line-height: 1.3;
}

.zt-product-card__btn-cart:hover {
    text-decoration-color: #1c3a13;
    background-color: rgba(28, 58, 19, 0.05);
}

.zt-product-card__btn-cart.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.zt-product-card__btn-cart.is-added {
    color: #334e2b;
    text-decoration: none;
}

/* ========================================
   DARK VARIANT — .zt-product-card--dark
   Used by Product Showcase Elementor widget
   !important needed to override Elementor's auto-generated selectors
   ======================================== */
.zt-product-card--dark {
    background: #1c3a13 !important;
    color: #fcfcf7 !important;
    height: 482px;
}

.zt-product-card--dark:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.zt-product-card--dark .zt-product-card__badge {
    background-color: rgba(252, 252, 247, 0.15) !important;
    color: #fcfcf7 !important;
}

.zt-product-card--dark .zt-product-card__pill {
    border-color: rgba(252, 252, 247, 0.2) !important;
    color: #fcfcf7 !important;
}

.zt-product-card--dark .zt-product-card__title,
.zt-product-card--dark .zt-product-card__title a {
    color: #fcfcf7 !important;
}

.zt-product-card--dark .zt-product-card__desc {
    color: rgba(252, 252, 247, 0.7) !important;
}

.zt-product-card--dark .zt-product-card__price {
    color: #fcfcf7 !important;
}

.zt-product-card--dark .zt-product-card__price--original {
    color: rgba(252, 252, 247, 0.5) !important;
}

.zt-product-card--dark .zt-product-card__price-badge {
    background-color: rgba(252, 252, 247, 0.15) !important;
    color: #fcfcf7 !important;
}

.zt-product-card--dark .zt-product-card__btn-learn {
    background-color: #fcfcf7 !important;
    color: #1c3a13 !important;
}

.zt-product-card--dark .zt-product-card__btn-learn:hover {
    background-color: #ffffff !important;
}

.zt-product-card--dark .zt-product-card__btn-cart {
    color: #fcfcf7 !important;
    text-decoration-color: rgba(252, 252, 247, 0.3) !important;
}

.zt-product-card--dark .zt-product-card__btn-cart:hover {
    text-decoration-color: #fcfcf7 !important;
    background-color: rgba(252, 252, 247, 0.08) !important;
}

.zt-product-card--dark .zt-product-card__btn-cart.is-added {
    color: #d3fa99 !important;
}

/* ========================================
   RESPONSIVE — Tablet
   ======================================== */
@media (max-width: 1024px) {
    .zt-product-card__content {
        padding-right: 1rem;
        gap: 1rem;
    }

    .zt-product-card__title {
        font-size: 18px;
    }

    .zt-product-card__desc {
        font-size: 13px;
    }
}

/* ========================================
   RESPONSIVE — Mobile
   ======================================== */
@media (max-width: 768px) {
    .zt-products-page {
        padding-top: 120px;
        padding-bottom: 48px;
    }

    .zt-products-grid {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .zt-product-card {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 12px;
        flex: 1 1 100%;
    }

    .zt-product-card--dark {
        height: auto;
    }

    .zt-product-card__image {
        flex-basis: auto;
        height: 300px;
        flex: none;
    }

    .zt-product-card__content {
        flex-basis: auto;
        padding: 0 0 8px;
        gap: 12px;
    }

    .zt-product-card__title {
        font-size: 18px;
    }

    .zt-product-card__desc {
        font-size: 13px;
        line-height: 1.4;
    }

    .zt-product-card__actions {
        gap: 8px;
    }

    .zt-product-card__btn-learn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .zt-product-card__btn-cart {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ========================================
   SHOP PAGE — Header white text (non-sticky)
   On /shop/ page, header starts with white text
   over the dark background. Scrolled/sticky
   state remains unchanged (normal behavior).
   ======================================== */
@media (min-width: 769px) {

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__logo-text,
    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__logo-dot {
        color: #fcfcf7;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__logo-img {
        filter: brightness(0) invert(1);
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__menu li a {
        color: #fcfcf7;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__login,
    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-login-wrap .seed-header__login {
        color: #fcfcf7;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__cta {
        background-color: #fcfcf7;
        color: #1c3a13;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__cta:hover {
        background-color: #f0f0e8;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__cta--cart svg {
        color: #1c3a13;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__cart-badge {
        background-color: #1c3a13;
        color: #fcfcf7;
    }
}

/* Mobile — shop page header white text */
@media (max-width: 768px) {
    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__mobile-logo .seed-header__logo-text {
        color: #fcfcf7;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__mobile-logo .seed-header__logo-dot {
        color: #fcfcf7;
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__mobile-logo .seed-header__logo-img {
        filter: brightness(0) invert(1);
    }

    body.post-type-archive-product .seed-header:not(.seed-header--scrolled) .seed-header__hamburger-svg {
        color: #fcfcf7;
    }
}