/* ═══════════════════════════════════════════
   AI DIGEST — Shop Page Styles
   Astra child theme, page-builder layout
   ═══════════════════════════════════════════ */

/* ─── Astra Container Override (required) ─── */
.page-template-page-shop .ast-container {
    display: block !important;  /* Astra forces flex */
    padding: 0 !important;      /* Astra forces 20px */
}

/* ═══════════════════════════════════════════
   SHOP HERO
   ═══════════════════════════════════════════ */
.shop-hero {
    background: var(--ast-global-color-5, #F0F5FA);
    border-bottom: 1px solid var(--ast-global-color-7, #D1D5DB);
}
.shop-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 32px 56px;
    text-align: center;
}
.shop-hero .shop-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #046bd2;
    margin-bottom: 16px;
    display: block;
}
.shop-hero h1 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 38px;
    font-weight: 700;
    color: var(--ast-global-color-2, #1e293b);
    margin: 0 0 12px;
    line-height: 1.3;
}
.shop-hero p {
    color: #334155;
    font-size: 16px;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ═══════════════════════════════════════════
   CATEGORY FILTERS
   ═══════════════════════════════════════════ */
.shop-filters {
    background: #fff;
    border-bottom: 1px solid var(--ast-global-color-7, #D1D5DB);
    position: sticky;
    top: 0;
    z-index: 50;
}
.shop-filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.shop-filters-inner::-webkit-scrollbar { display: none; }
.shop-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    background: transparent;
    color: rgba(30,41,59,.4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.shop-filter-btn:hover { color: var(--ast-global-color-2, #1e293b); }
.shop-filter-btn.active {
    color: var(--ast-global-color-2, #1e293b);
    border-bottom-color: #046bd2;
}
.filter-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    color: #D1D5DB;
}
.shop-filter-btn.active .filter-count { color: #046bd2; }

/* ═══════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════ */
.shop-grid {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0 64px;
    gap: 24px;
}
.shop-grid .product-card { width: calc(33.333% - 16px); margin: 0; }

/* ═══════════════════════════════════════════
   PRODUCT CARD
   ═══════════════════════════════════════════ */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--ast-global-color-7, #D1D5DB);
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    transform: translateY(-2px);
}
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.product-card-img {
    position: relative;
    background: var(--ast-global-color-5, #F0F5FA);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #10b981;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
}
.product-card-body { padding: 20px 16px 12px; }
.product-cat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #046bd2;
    margin-bottom: 10px;
    display: block;
}
.product-card-body h3 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--ast-global-color-2, #1e293b);
    line-height: 1.35;
    margin: 0 0 10px;
}
.product-desc {
    color: #334155;
    font-size: 13.5px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-footer { padding: 0 16px 16px; }
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}
.product-price {
    font-family: 'Manrope', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--ast-global-color-2, #1e293b);
}
.product-price-rub {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}
.product-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(30,41,59,.45);
    text-transform: uppercase;
}
.product-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.dot-green { width: 5px; height: 5px; border-radius: 50%; background: #10b981; }
.btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ast-global-color-0, #046bd2);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 14px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}
.btn-buy:hover {
    background: var(--ast-global-color-1, #0356b0);
    color: #fff;
}

/* ═══════════════════════════════════════════
   PRODUCT DETAIL — BREADCRUMBS
   ═══════════════════════════════════════════ */
.pd-breadcrumbs {
    background: var(--ast-global-color-5, #F0F5FA);
    border-bottom: 1px solid var(--ast-global-color-7, #D1D5DB);
    padding: 0 32px;
}
.pd-breadcrumbs-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(30,41,59,.45);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.pd-breadcrumbs-inner a { color: #046bd2; text-decoration: none; }
.pd-breadcrumbs-inner a:hover { text-decoration: underline; }
.pd-bc-sep { margin: 0 8px; color: #cbd5e1; }
.pd-bc-current { color: var(--ast-global-color-2, #1e293b); font-weight: 700; }

/* ═══════════════════════════════════════════
   PRODUCT DETAIL — LAYOUT
   ═══════════════════════════════════════════ */
.pd-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
    display: flex;
    gap: 48px;
    overflow-x: hidden;
    align-items: flex-start;
}

/* ─── Gallery (Swiper) ─── */
.pd-gallery {
    flex: 0 0 480px;
    background: var(--ast-global-color-5, #F0F5FA);
    border-radius: 8px;
    overflow: hidden;
}
.pd-swiper-main { width: 480px; height: 480px; }
.pd-swiper-main .swiper-wrapper { height: 100%; }
.pd-swiper-main .swiper-slide {
    height: 100% !important;  /* Swiper overrides height */
    display: flex;
    align-items: center;
    justify-content: center;
}
.pd-swiper-main .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pd-swiper-main .swiper-button-prev,
.pd-swiper-main .swiper-button-next {
    color: var(--ast-global-color-2, #1e293b);
    background: rgba(255,255,255,.85);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.pd-swiper-main .swiper-button-prev::after,
.pd-swiper-main .swiper-button-next::after { font-size: 16px; font-weight: 700; }
.pd-swiper-main .swiper-button-prev:hover,
.pd-swiper-main .swiper-button-next:hover { background: #fff; }
.pd-swiper-main .swiper-pagination-bullet-active { background: #046bd2; }

/* ─── Info ─── */
.pd-info { flex: 1; min-width: 0; }
.pd-cat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #046bd2;
    margin-bottom: 12px;
    display: block;
}
.pd-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--ast-global-color-2, #1e293b);
    line-height: 1.3;
    margin: 0 0 16px;
}
.pd-stats { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pd-stat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(30,41,59,.45);
    padding: 5px 12px;
    background: var(--ast-global-color-5, #F0F5FA);
    border-radius: 4px;
}
.pd-stat-green { color: #10b981; background: rgba(16,185,129,.08); }
.pd-price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ast-global-color-7, #D1D5DB);
}
.pd-price {
    font-family: 'Manrope', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--ast-global-color-2, #1e293b);
}
.pd-price-alt { font-size: 16px; color: #94a3b8; font-weight: 500; }
.pd-price-variant {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: rgba(30,41,59,.45);
    margin-left: 8px;
}

/* ─── Options / Variants ─── */
.pd-options { margin-bottom: 28px; }
.pd-option-group {
    margin-bottom: 20px;
    max-height: 300px !important;   /* Astra may override */
    overflow-y: auto !important;    /* Astra may override */
    scrollbar-width: thin;
    display: block;
}
.pd-option-group::-webkit-scrollbar { width: 4px; }
.pd-option-group::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.pd-option-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(30,41,59,.5);
    margin-bottom: 10px;
    display: block;
}
.pd-variant {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--ast-global-color-7, #D1D5DB);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.pd-variant:hover { border-color: #cbd5e1; background: var(--ast-global-color-5, #F0F5FA); }
.pd-variant-active,
.pd-variant:has(input:checked) { border-color: #046bd2; background: rgba(4,107,210,.04); }
.pd-variant input[type="radio"] { margin-top: 2px; accent-color: #046bd2; flex-shrink: 0; }
.pd-variant-text { font-size: 14px; color: var(--ast-global-color-2, #1e293b); line-height: 1.4; }
.pd-variant-modify {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #046bd2;
    margin-left: 6px;
}
.pd-text-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--ast-global-color-7, #D1D5DB);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    transition: border-color .2s;
    box-sizing: border-box;
}
.pd-text-input:focus { border-color: #046bd2; outline: none; }

/* ─── Buy / Delivery / Seller ─── */
.btn-buy-lg { font-size: 11px; padding: 18px 32px; margin-bottom: 16px; }
.pd-delivery {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #10b981;
    margin-bottom: 16px;
}
.pd-seller { font-size: 13px; color: #94a3b8; }
.pd-seller strong { color: #64748b; }

/* ─── Description ─── */
.pd-section { max-width: 1200px; margin: 0 auto; padding: 0 32px 48px; }
.pd-section-inner { border-top: 1px solid var(--ast-global-color-7, #D1D5DB); padding-top: 40px; }
.pd-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ast-global-color-2, #1e293b);
    margin: 0 0 24px;
}
.pd-description { font-size: 15px; line-height: 1.7; color: #334155; }
.pd-description attention {
    display: block;
    background: var(--ast-global-color-5, #F0F5FA);
    border-left: 3px solid #046bd2;
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
}
.aid-info-block {
    display: block;
    background: var(--ast-global-color-5, #F0F5FA);
    border-left: 3px solid #046bd2;
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.7;
}
.aid-delivery-block {
    display: block;
    background: rgba(16,185,129,.06);
    border-left: 3px solid #10b981;
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.7;
}
.pd-add-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--ast-global-color-7, #D1D5DB);
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
}

/* ─── Navigation ─── */
.pd-nav { border-top: 1px solid var(--ast-global-color-7, #D1D5DB); padding: 24px 32px; }
.pd-nav-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; }
.pd-nav-prev, .pd-nav-next, .pd-nav-all {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #046bd2;
    text-decoration: none;
}
.pd-nav-prev:hover, .pd-nav-next:hover, .pd-nav-all:hover { opacity: .7; }

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET (≤1024px)
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .shop-hero-inner { padding: 56px 28px 44px; }
    .shop-hero h1 { font-size: 30px; }
    .shop-filters-inner { padding: 0 28px; }
    .shop-filter-btn { padding: 13px 18px; }
    .shop-grid { gap: 20px; padding: 32px 0 48px; }
    .shop-grid .product-card { width: calc(50% - 10px); }
    .product-card-body { padding: 18px 14px 14px; }
    .product-card-footer { padding: 0 14px 14px; }
    .product-card-body h3 { font-size: 15px; }
    .product-price { font-size: 22px; }
    .pd-layout { gap: 36px; padding: 40px 28px; }
    .pd-gallery { flex: 0 0 380px; }
    .pd-swiper-main { width: 380px; height: 380px; }
    .pd-title { font-size: 24px; }
    .pd-price { font-size: 30px; }
    .pd-variant { padding: 14px 16px; }
    .pd-variant-text { font-size: 13.5px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — SMALL TABLET (≤900px)
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
    .shop-hero-inner { padding: 48px 24px 40px; }
    .shop-hero h1 { font-size: 28px; }
    .shop-grid { padding: 28px 0 40px; gap: 18px; }
    .shop-grid .product-card { width: calc(50% - 9px); }
    .shop-filters-inner { padding: 0 24px; }
    .shop-filter-btn { padding: 12px 16px; font-size: 8px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE (≤768px)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .shop-hero-inner { padding: 48px 16px 36px; }
    .shop-hero h1 { font-size: 26px; }
    .shop-hero p { font-size: 14px; }
    .shop-filters-inner { padding: 0 16px; }
    .shop-filter-btn { padding: 12px 16px; font-size: 8px; }
    .shop-grid { gap: 16px; padding: 24px 0 40px; }
    .shop-grid .product-card { width: 100%; }
    .product-card-body { padding: 16px 12px 12px; }
    .product-card-footer { padding: 0 12px 16px; }
    .product-card-img { aspect-ratio: 16/9; }
    .pd-breadcrumbs { padding: 0 16px; }
    .pd-breadcrumbs-inner { font-size: 9px; padding: 14px 0; }
    .pd-layout { flex-direction: column; gap: 24px; padding: 24px 16px; overflow-x: hidden; }
    .pd-gallery { flex: none; width: 100%; border-radius: 0; overflow: hidden; }
    .pd-swiper-main { width: 100% !important; height: auto !important; aspect-ratio: 4/3; }
    .pd-title { font-size: 22px; }
    .pd-price { font-size: 28px; }
    .pd-section { padding: 0 16px 32px; }
    .pd-section-inner { padding-top: 28px; }
    .pd-nav { padding: 20px 16px; }
    .pd-nav-inner { flex-direction: column; gap: 12px; text-align: center; }
    .pd-options { margin-bottom: 24px; }
    .pd-option-group { margin-bottom: 16px; max-height: 250px !important; }
    .pd-variant { padding: 14px 16px; gap: 12px; margin-bottom: 8px; }
    .pd-variant input[type="radio"] { width: 18px; height: 18px; margin-top: 1px; }
    .pd-variant-text { font-size: 13px; line-height: 1.5; }
    .pd-variant-modify { display: block; margin-left: 0; margin-top: 4px; }
}
