/**
 * Shop / Archive Products — OPTEAM Construct
 * Self-contained styles — overrides Astra + WooCommerce completely.
 */

/* ============================================
   NUCLEAR RESETS — Kill Astra & WooCommerce
   ============================================ */
.ot-shop-wrap,
.ot-shop-wrap *,
.ot-shop-wrap *::before,
.ot-shop-wrap *::after {
    box-sizing: border-box;
}

/* Kill WooCommerce default product grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: none !important;
}

/* Kill WooCommerce padding on our wrapper */
.woocommerce-page .site-content.ot-shop-wrap,
.woocommerce .site-content.ot-shop-wrap,
.ot-shop-wrap {
    padding-top: clamp(120px, 14vw, 160px) !important;
    padding-bottom: 80px !important;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Kill WooCommerce container overrides */
.ot-shop-wrap > .container {
    padding: 0 24px !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
}

/* Kill the aggressive mobile * reset from style.css for shop */
@media (max-width: 1024px) {
    .ot-shop-wrap .ot-shop-sidebar-card,
    .ot-shop-wrap .ot-shop-card,
    .ot-shop-wrap .ot-shop-toolbar {
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    .ot-shop-wrap .ot-shop-card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
    }
}

/* Tame the Lusion skew reveal — no skew in shop */
.ot-shop-wrap .reveal,
.ot-shop-wrap .reveal-left,
.ot-shop-wrap .reveal-right {
    transform: translateY(24px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}

.ot-shop-wrap .reveal.visible,
.ot-shop-wrap .reveal-left.visible,
.ot-shop-wrap .reveal-right.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ============================================
   HERO
   ============================================ */
.ot-shop-hero {
    text-align: center;
    padding: 0 0 48px;
}

.ot-shop-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: var(--text-primary);
    margin: 16px 0 12px;
}

.ot-shop-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   LAYOUT: SIDEBAR + MAIN
   ============================================ */
.ot-shop-layout {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    gap: 32px !important;
    align-items: start;
}

@media (max-width: 900px) {
    .ot-shop-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   SIDEBAR
   ============================================ */
.ot-shop-sidebar {
    position: sticky;
    top: calc(var(--header-height, 80px) + 20px);
}

@media (max-width: 900px) {
    .ot-shop-sidebar {
        position: static;
    }
}

.ot-shop-sidebar-card {
    background: rgba(15, 25, 40, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
}

.ot-sidebar-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin: 20px 0 10px;
}

/* Search widget */
.ot-shop-search-wrap {
    position: relative;
}

.ot-shop-search-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.ot-shop-search-wrap .ot-shop-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: rgba(10, 14, 23, 0.8) !important;
    border: 1px solid rgba(242, 183, 5, 0.12);
    border-radius: 999px;
    color: #F0F2F5 !important;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
}

.ot-shop-search-wrap .ot-shop-input:focus {
    border-color: rgba(242, 183, 5, 0.5);
    background: rgba(10, 14, 23, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.1);
}

.ot-shop-search-wrap .ot-shop-input::placeholder {
    color: #6B7D95;
}

/* Select (category filter + sort) */
.ot-shop-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 14, 23, 0.8) !important;
    border: 1px solid rgba(242, 183, 5, 0.12);
    border-radius: 999px;
    color: #F0F2F5 !important;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    color-scheme: dark;
    -webkit-appearance: none;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.ot-shop-select:focus {
    border-color: rgba(242, 183, 5, 0.5);
    background: rgba(10, 14, 23, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.1);
}

/* Select option styling (dropdown items) */
.ot-shop-select option {
    background: #0F1923;
    color: #F0F2F5;
}

/* ============================================
   TOOLBAR
   ============================================ */
.ot-shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 14px 20px;
    background: rgba(15, 25, 40, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    flex-wrap: wrap;
}

.ot-shop-results {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.ot-shop-results strong {
    color: var(--accent-gold);
    font-weight: 800;
}

.ot-shop-sort-wrap {
    flex-shrink: 0;
}

.ot-shop-sort-wrap .ot-shop-select {
    min-width: 200px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .ot-shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .ot-shop-sort-wrap .ot-shop-select {
        min-width: 100%;
    }
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.ot-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 24px !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

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

/* ============================================
   SHOP CARD
   ============================================ */
.ot-shop-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 25, 40, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ot-shop-card:hover {
    transform: translateY(-6px);
    border-color: rgba(242, 183, 5, 0.3) !important;
    box-shadow: 0 4px 24px rgba(242, 183, 5, 0.15), 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Card header — icon area */
.ot-shop-card__header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 24px 16px;
    background: linear-gradient(135deg, rgba(242, 183, 5, 0.06) 0%, transparent 60%);
    text-decoration: none;
}

.ot-shop-card__icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
    border-radius: 14px;
    background: rgba(242, 183, 5, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ot-shop-card:hover .ot-shop-card__icon {
    transform: scale(1.1);
    box-shadow: 0 0 24px rgba(242, 183, 5, 0.25);
}

.ot-shop-card__icon svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

/* Product image (replaces generic icon when a featured image exists) */
.ot-shop-card__header.has-image {
    padding: 0;
    background: none;
    display: block;
}

.ot-shop-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.ot-shop-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ot-shop-card:hover .ot-shop-card__image img {
    transform: scale(1.06);
}

/* Card body */
.ot-shop-card__body {
    padding: 16px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ot-shop-card__tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-gold);
    background: rgba(242, 183, 5, 0.08);
    border: 1px solid rgba(242, 183, 5, 0.15);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.ot-shop-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.35;
}

.ot-shop-card__title a {
    color: var(--text-primary) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.ot-shop-card__title a:hover {
    color: var(--accent-gold) !important;
}

.ot-shop-card__excerpt {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

/* Card footer — price + button */
.ot-shop-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.ot-shop-card__price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.ot-price-custom {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
}

/* WooCommerce price HTML override */
.ot-shop-card__price .woocommerce-Price-amount {
    color: var(--accent-gold) !important;
}

.ot-shop-card__price del {
    color: var(--text-muted) !important;
    opacity: 0.5;
}

.ot-shop-card__price ins {
    text-decoration: none;
    color: var(--accent-gold) !important;
}

/* Buttons inside card footer */
.ot-shop-card__footer .ot-card-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    background: var(--accent-gold) !important;
    color: var(--bg-primary) !important;
    border: none !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ot-shop-card__footer .ot-card-btn-primary:hover {
    background: var(--accent-gold-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(242, 183, 5, 0.3);
}

.ot-shop-card__footer .ot-card-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ot-shop-card__footer .ot-card-btn-secondary:hover {
    border-color: rgba(242, 183, 5, 0.3) !important;
    background: rgba(242, 183, 5, 0.05) !important;
    transform: translateY(-2px);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.ot-shop-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: var(--text-muted);
}

.ot-shop-empty svg {
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.5;
    width: 48px;
    height: 48px;
}

.ot-shop-empty p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 4px;
}

.ot-shop-empty small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   CARD FADE-IN
   ============================================ */
.ot-card-fadein {
    animation: otCardFade 0.4s ease both;
}

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

/* ============================================
   WOOCOMMERCE NOTICES
   ============================================ */
.ot-shop-main .woocommerce-notices-wrapper:not(:empty) {
    margin-bottom: 20px;
}

.ot-shop-main .woocommerce-message,
.ot-shop-main .woocommerce-error,
.ot-shop-main .woocommerce-info {
    border-radius: 14px;
}
