/*
 * OnagiTV — Shop Page Styles
 * File: css/shop.css
 * Loaded on: shop, product-category, product-tag pages only.
 * Inherits CSS custom properties from style.css (:root).
 */

/* ================================================================
   PAGE WRAPPER
================================================================ */
.otv-shop-main {
    padding-top: 80px; /* clear the fixed header */
    background: var(--clr-bg);
    min-height: 80vh;
}

/* ================================================================
   HERO SECTION
================================================================ */
.otv-shop-hero {
    position: relative;
    background: linear-gradient(135deg, #0b1221 0%, #0d1f3c 55%, #0e2545 100%);
    padding: 4.5rem 0 5rem;
    overflow: hidden;
    text-align: center;
}

.otv-shop-hero__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(26,86,219,.28) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 60%, rgba(8,145,178,.22) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%,  rgba(249,115,22,.08) 0%, transparent 40%);
    pointer-events: none;
}

.otv-shop-hero__inner {
    position: relative;
    z-index: 2;
}

.otv-shop-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem 1rem;
    border-radius: 9999px;
    background: rgba(26,86,219,.2);
    border: 1px solid rgba(26,86,219,.4);
    color: #93c5fd;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.otv-shop-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -.04em;
    line-height: 1.08;
    margin: 0 0 .85rem;
}

.otv-shop-hero__sub {
    font-size: clamp(.9rem, 1.5vw, 1.05rem);
    color: rgba(255,255,255,.6);
    max-width: 540px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.otv-shop-hero__pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
}

.otv-shop-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .85rem;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,.8);
}

.otv-shop-pill svg {
    color: #22c55e;
    flex-shrink: 0;
}

/* ================================================================
   SHOP BODY — toolbar + grid
================================================================ */
.otv-shop-body {
    padding: 2.75rem 0 4.5rem;
}

/* Toolbar row */
.otv-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}

/* WooCommerce result count */
p.woocommerce-result-count {
    font-size: .82rem;
    color: var(--clr-fg-muted);
    margin: 0 !important;
    line-height: 1;
}

/* WooCommerce ordering dropdown */
.woocommerce-ordering,
form.woocommerce-ordering {
    margin: 0 !important;
}

.woocommerce-ordering select {
    padding: .55rem 2.2rem .55rem .9rem !important;
    border: 1.5px solid var(--clr-border) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--clr-card) !important;
    color: var(--clr-fg) !important;
    font-family: var(--font-body) !important;
    font-size: .84rem !important;
    font-weight: 500 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    box-shadow: var(--shadow-sm) !important;
    outline: none !important;
    transition: border-color .2s, box-shadow .2s !important;
}

.woocommerce-ordering select:focus {
    border-color: var(--clr-primary) !important;
    box-shadow: 0 0 0 3px rgba(26,86,219,.1) !important;
}

/* ================================================================
   PRODUCT GRID
================================================================ */
.otv-shop-grid-wrap {
    width: 100%;
}

/* Override WooCommerce default float grid */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 2.5rem !important;
    float: none !important;
    clear: both !important;
}

ul.products::after {
    display: none !important; /* kill WooCommerce clearfix */
}

ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Card styles below */
    background: var(--clr-card);
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform .22s cubic-bezier(.4,0,.2,1),
                box-shadow  .22s cubic-bezier(.4,0,.2,1),
                border-color .22s;
    animation: otvCardIn .5s ease both;
}

ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(15,23,42,.13);
    border-color: var(--clr-primary);
}

/* Staggered entrance */
ul.products li.product:nth-child(1) { animation-delay: .05s; }
ul.products li.product:nth-child(2) { animation-delay: .10s; }
ul.products li.product:nth-child(3) { animation-delay: .15s; }
ul.products li.product:nth-child(4) { animation-delay: .20s; }
ul.products li.product:nth-child(5) { animation-delay: .25s; }
ul.products li.product:nth-child(6) { animation-delay: .30s; }

@keyframes otvCardIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Product image ── */
ul.products li.product a img {
    width: 100% !important;
    height: 210px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    transition: transform .35s ease;
}

ul.products li.product:hover a img {
    transform: scale(1.03);
}

/* Wrap the image in overflow:hidden for scale effect */
ul.products li.product .woocommerce-loop-product__link {
    display: block;
    overflow: hidden;
}

/* ── Fallback thumbnail placeholder (no image) ── */
ul.products li.product .woocommerce-loop-product__link:not(:has(img)) {
    display: block;
    width: 100%;
    height: 210px;
    background: linear-gradient(145deg, #0b1221 0%, #1a2a4a 55%, #0e1e3d 100%);
}

/* ── Product title ── */
ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-display) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--clr-fg) !important;
    letter-spacing: -.02em !important;
    line-height: 1.3 !important;
    padding: 1.1rem 1.25rem .25rem !important;
    margin: 0 !important;
}

/* ── Price ── */
ul.products li.product .price {
    font-family: var(--font-display) !important;
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    color: var(--clr-primary) !important;
    padding: .1rem 1.25rem .9rem !important;
    display: block !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

ul.products li.product .price del {
    font-size: .9rem !important;
    font-weight: 400 !important;
    color: var(--clr-fg-subtle) !important;
    margin-right: .35rem;
    opacity: .8;
}

ul.products li.product .price ins {
    text-decoration: none !important;
}

/* Push add-to-cart to the bottom */
ul.products li.product {
    position: relative;
}

/* ── Sale badge ── */
ul.products li.product .onsale {
    position: absolute !important;
    top: .75rem !important;
    left: .75rem !important;
    right: auto !important;
    background: var(--clr-cta) !important;
    color: #fff !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-display) !important;
    font-size: .68rem !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    padding: .28rem .65rem !important;
    min-height: unset !important;
    min-width: unset !important;
    line-height: 1 !important;
    z-index: 2;
}

/* ── Featured badge ── */
ul.products li.product.featured {
    border-color: var(--clr-primary) !important;
    box-shadow: 0 0 0 3px rgba(26,86,219,.1), var(--shadow-md) !important;
}

/* ── Add to Cart button ── */
ul.products li.product .button,
ul.products li.product a.button,
ul.products li.product .add_to_cart_button,
ul.products li.product .product_type_simple {
    display: block !important;
    margin: auto 1.25rem 1.25rem !important;
    padding: .8rem 1rem !important;
    background: linear-gradient(135deg, var(--clr-primary) 0%, #2563eb 100%) !important;
    color: #fff !important;
    font-family: var(--font-display) !important;
    font-size: .9rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    text-align: center !important;
    letter-spacing: .01em !important;
    box-shadow: 0 4px 16px rgba(26,86,219,.28) !important;
    transition: transform .15s, box-shadow .15s, background .2s !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    width: calc(100% - 2.5rem) !important;
}

ul.products li.product .button:hover,
ul.products li.product a.button:hover,
ul.products li.product .add_to_cart_button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 26px rgba(26,86,219,.42) !important;
    background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary) 100%) !important;
}

ul.products li.product .added_to_cart {
    display: block !important;
    text-align: center !important;
    font-size: .8rem !important;
    font-weight: 600 !important;
    color: var(--clr-success) !important;
    margin: 0 1.25rem .5rem !important;
    text-decoration: none !important;
}

/* ================================================================
   PAGINATION
================================================================ */
nav.woocommerce-pagination {
    margin-top: 2.5rem !important;
    text-align: center !important;
}

.woocommerce-pagination ul.page-numbers {
    display: inline-flex !important;
    gap: .4rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-pagination ul.page-numbers li { margin: 0 !important; }

.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: var(--radius-sm) !important;
    border: 1.5px solid var(--clr-border) !important;
    background: var(--clr-card) !important;
    color: var(--clr-fg-muted) !important;
    font-family: var(--font-display) !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all .2s !important;
}

.woocommerce-pagination ul.page-numbers li a:hover {
    border-color: var(--clr-primary) !important;
    color: var(--clr-primary) !important;
    background: var(--clr-primary-light) !important;
}

.woocommerce-pagination ul.page-numbers li span.current {
    background: var(--clr-primary) !important;
    border-color: var(--clr-primary) !important;
    color: #fff !important;
}

/* ================================================================
   EMPTY STATE
================================================================ */
.otv-shop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem;
    text-align: center;
    gap: 1.1rem;
}

.otv-shop-empty__icon {
    width: 80px;
    height: 80px;
    background: var(--clr-bg-alt);
    border: 1.5px solid var(--clr-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-fg-subtle);
}

.otv-shop-empty h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--clr-fg);
    margin: 0;
}

.otv-shop-empty p {
    color: var(--clr-fg-muted);
    font-size: .9rem;
    max-width: 360px;
    margin: 0;
}

/* ================================================================
   TRUST STRIP
================================================================ */
.otv-shop-trust {
    background: var(--clr-card);
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    padding: 2.5rem 0;
}

.otv-shop-trust__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.otv-trust-card {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-border);
    background: var(--clr-bg);
    transition: box-shadow .2s, border-color .2s, transform .2s;
}

.otv-trust-card:hover {
    border-color: var(--clr-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.otv-trust-card__icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.otv-trust-card__icon--blue   { background: var(--clr-primary-light); color: var(--clr-primary); }
.otv-trust-card__icon--green  { background: #dcfce7; color: var(--clr-success); }
.otv-trust-card__icon--orange { background: #fff7ed; color: var(--clr-cta); }

.otv-trust-card__body strong {
    display: block;
    font-family: var(--font-display);
    font-size: .88rem;
    font-weight: 700;
    color: var(--clr-fg);
    margin-bottom: .25rem;
}

.otv-trust-card__body span {
    font-size: .78rem;
    color: var(--clr-fg-muted);
    line-height: 1.5;
}

/* ================================================================
   WHATSAPP CTA BANNER
================================================================ */
.otv-shop-cta-banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1221 0%, #0d1f3c 60%, #0e2545 100%);
    padding: 3.5rem 0;
}

.otv-shop-cta-banner__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 50%, rgba(26,86,219,.25) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 50%, rgba(8,145,178,.2)  0%, transparent 55%);
    pointer-events: none;
}

.otv-shop-cta-banner__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.otv-shop-cta-banner__text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    margin: 0 0 .4rem;
}

.otv-shop-cta-banner__text p {
    color: rgba(255,255,255,.6);
    font-size: .92rem;
    margin: 0;
}

.otv-shop-cta-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .95rem 1.85rem;
    background: #25d366;
    color: #fff !important;
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    text-decoration: none !important;
    box-shadow: 0 6px 24px rgba(37,211,102,.35);
    transition: transform .18s, box-shadow .18s;
    white-space: nowrap;
    flex-shrink: 0;
}

.otv-shop-cta-banner__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(37,211,102,.45);
}

/* ================================================================
   WOO NOTICES
================================================================ */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
    margin-bottom: 1.5rem !important;
    border-radius: var(--radius-md) !important;
    padding: 1rem 1.25rem !important;
    font-size: .9rem !important;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 768px) {
    .otv-shop-hero { padding: 3rem 0 3.5rem; }

    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 1rem !important;
    }

    .otv-shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .otv-shop-cta-banner__inner {
        flex-direction: column;
        text-align: center;
    }

    .otv-shop-cta-banner__btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    ul.products {
        grid-template-columns: 1fr !important;
    }

    .otv-shop-trust__grid {
        grid-template-columns: 1fr;
    }
}
