/* ═══════════════════════════════════════════════════════
   PRODUCT — страница карточки товара:
   лейаут, галерея, инфо, блок покупки, характеристики, нижний блок
   ═══════════════════════════════════════════════════════ */

.product-page { padding-bottom: 60px; }

/* ─── ДВУХКОЛОНОЧНЫЙ ЛЕЙАУТ ─── */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 28px 0 32px;
    align-items: start;
}

/* ─── ГАЛЕРЕЯ ─── */
.product-gallery { position: sticky; top: 16px; min-width: 0; }

.product-gallery-main {
    position: relative;
    aspect-ratio: 1 / 1;
    background: white;
    border-radius: 14px; border: 1px solid #eee;
    overflow: hidden; margin-bottom: 10px;
}
.product-gallery-img   { width: 100%; height: 100%; }
.product-gallery-img--contain { object-fit: contain; }
.product-gallery-img--cover   { object-fit: cover; }
.product-gallery-no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 80px; opacity: 0.15;
}

/* Стрелки на главной картинке */
.pg-main-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: white; border: 2px solid #f25e5e;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #f25e5e;
    box-shadow: 0 2px 8px rgba(242,94,94,0.2);
    opacity: 0;
    transition: opacity 0.2s, background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
    z-index: 2;
}
.pg-main-arrow--prev { left: 12px; }
.pg-main-arrow--next { right: 12px; }
.product-gallery-main:hover .pg-main-arrow:not(:disabled) { opacity: 1; }
.pg-main-arrow:hover:not(:disabled) {
    background: #f25e5e; color: white;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 14px rgba(242,94,94,0.4);
}
.pg-main-arrow:active:not(:disabled) { transform: translateY(-50%) scale(0.95); }
.pg-main-arrow:disabled { opacity: 0 !important; cursor: default; }

/* ─── МИНИАТЮРЫ ─── */
.product-thumbs-wrap {
    display: flex; align-items: center; gap: 8px; margin-top: 10px;
    min-width: 0;
    max-width: 100%;
}
.product-thumbs {
    display: flex; gap: 8px; overflow-x: auto; flex: 1;
    min-width: 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
    cursor: grab;
}
.product-thumbs:active { cursor: grabbing; }
.product-thumbs::-webkit-scrollbar { display: none; }
.product-thumb {
    width: 72px; height: 72px; flex-shrink: 0;
    border-radius: 8px; overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer; background: #f8f8f8;
    transition: border-color 0.15s;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.active { border-color: #f25e5e; }
.product-thumb:hover  { border-color: #f9c4b8; }

.product-thumbs-arrow {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
    background: white; border: 2px solid #f25e5e;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #f25e5e;
    transition: background 0.15s, color 0.15s, transform 0.1s, border-color 0.15s;
    box-shadow: 0 2px 8px rgba(242,94,94,0.2);
}
.product-thumbs-arrow:hover:not(:disabled) {
    background: #f25e5e; color: white;
    transform: scale(1.08); box-shadow: 0 4px 14px rgba(242,94,94,0.4);
}
.product-thumbs-arrow:active:not(:disabled) { transform: scale(0.95); }
.product-thumbs-arrow:disabled {
    color: #ccc; border-color: #e0e0e0;
    cursor: default; background: #fafafa; box-shadow: none;
}

/* ─── ИНФОРМАЦИОННАЯ ПАНЕЛЬ ─── */
.product-info { display: flex; flex-direction: column; gap: 14px; }

/* Белый прямоугольник с названием */
.product-title-box {
    background: white; border-radius: 12px;
    border: 1px solid #eee; padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.product-title {
    font-size: 22px; font-weight: 900;
    color: #1a1a1a; letter-spacing: -0.4px; line-height: 1.3;
}

/* Мета-строка: производитель / артикул / наличие */
.product-meta-line {
    display: flex; align-items: center; width: 100%;
    background: white; border-radius: 10px; border: 1px solid #eee;
    padding: 10px 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.product-meta-cell {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; flex: 1; min-width: 0;
}
.product-meta-cell--center { justify-content: center; }
.product-meta-cell--right  { justify-content: flex-end; }
.product-meta-label { color: #bbb; font-size: 12px; white-space: nowrap; }

/* Производитель */
.product-manufacturer-link {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    background: #fff5f0; border: 1px solid #ffd4c4;
    border-radius: 20px; font-size: 12px; font-weight: 700;
    color: #c0441a; text-decoration: none; transition: all 0.15s;
}
.product-manufacturer-link:hover { background: #f25e5e; border-color: #f25e5e; color: white; }

/* Наличие */
.product-sku { font-size: 12px; color: #555; font-weight: 700; }
.product-stock-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.product-stock-badge.in  { color: #059669; }
.product-stock-badge.out { color: #aaa; }

/* Цена + поделиться */
.product-price-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
    flex-wrap: nowrap;
}
.product-price {
    font-size: 30px; font-weight: 900;
    color: #1a1a1a; letter-spacing: -1px;
    flex-shrink: 0;
}
.product-price-row .product-share { margin-left: auto; flex-shrink: 0; flex-wrap: nowrap; }

/* Поделиться */
.product-share { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.product-share-label { font-size: 12px; color: #aaa; font-weight: 600; }
.product-share-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    background: white; border: 1px solid #e0e0e0;
    border-radius: 6px; font-size: 12px; font-weight: 600;
    color: #666; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.product-share-btn:hover:not(:disabled) { border-color: #f25e5e; color: #f25e5e; }
.product-share-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ─── БЛОК ПОКУПКИ — split ─── */
.product-buy-split {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    background: white; border: 1px solid #eee;
    border-radius: 14px; overflow: hidden;
}
.product-buy-divider { background: #f0f0f0; width: 1px; }
.product-buy-half {
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 8px;
}
.product-buy-half-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 800; color: #222;
    text-transform: uppercase; letter-spacing: 0.6px;
}
.product-buy-half--quick .product-buy-half-title { color: #555; }
.product-buy-half--cart  .product-buy-half-title { color: #f25e5e; }
.product-buy-half-desc { font-size: 11px; color: #aaa; line-height: 1.4; min-height: 28px; }

/* Форма "1 клик" */
.product-quick-form { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.product-quick-phone {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid #e8e8e8; border-radius: 8px;
    font-size: 13px; outline: none; background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.product-quick-phone:focus {
    border-color: #f25e5e; background: white;
    box-shadow: 0 0 0 3px rgba(242,94,94,0.1);
}
.product-quick-submit {
    width: 100%; padding: 9px 12px;
    background: #2a2a2a; color: white; border: none;
    border-radius: 8px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.product-quick-submit:hover  { background: #444; }
.product-quick-submit:active { transform: scale(0.97); }
.product-quick-result { font-size: 12px; color: #059669; min-height: 16px; }

/* Контролы корзины */
.product-cart-controls { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.product-cart-controls .product-card-qty {
    display: flex; align-items: stretch;
    border-radius: 8px; overflow: hidden;
    background: #f4f4f4; height: 36px; width: 100%;
}
.product-cart-controls .qty-btn { width: 32px; height: 100%; font-size: 17px; flex-shrink: 0; }
.product-cart-controls .qty-val {
    flex: 1; height: 100%; font-size: 14px; text-align: center;
    border: none;
    border-left: 1px solid rgba(0,0,0,0.08);
    border-right: 1px solid rgba(0,0,0,0.08);
    background: #f4f4f4; -moz-appearance: textfield; outline: none;
}
.product-cart-controls .qty-val::-webkit-inner-spin-button,
.product-cart-controls .qty-val::-webkit-outer-spin-button { -webkit-appearance: none; }

.product-add-btn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 9px 12px;
    background: #f25e5e; color: white; border: none;
    border-radius: 8px; font-size: 13px; font-weight: 800;
    cursor: pointer; transition: background 0.15s, transform 0.1s;
    box-shadow: 0 2px 0 #a33a0f, 0 3px 10px rgba(242,94,94,0.3);
}
.product-add-btn:hover  { background: #d94f4f; }
.product-add-btn:active { transform: scale(0.97); }
.product-add-btn.added { background: #22c55e; box-shadow: none; }

/* Товар недоступен */
.product-out-label {
    padding: 16px; background: #f8f8f8;
    border-radius: 12px; text-align: center;
    font-size: 14px; color: #aaa; font-weight: 600;
    border: 1px dashed #e0e0e0;
}

/* ─── ХАРАКТЕРИСТИКИ + ДОВЕРИЕ — split ─── */
.product-section-title {
    font-size: 11px; font-weight: 700; color: #aaa;
    text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}
.product-attrs-striped {
    border-radius: 10px; overflow: hidden; border: 1px solid #eee;
}
.attrs-stripe-row {
    display: flex; align-items: center;
    padding: 9px 14px; transition: background 0.15s; gap: 12px;
}
.attrs-stripe-row:nth-child(odd)  { background: #ffffff; }
.attrs-stripe-row:nth-child(even) { background: #f4f4f4; }
.attrs-stripe-row:hover            { background: #fff8f8 !important; }
.attrs-stripe-key { color: #888; font-size: 13px; flex: 0 0 45%; min-width: 0; }
.attrs-stripe-val { color: #1a1a1a; font-size: 13px; font-weight: 600; flex: 1; min-width: 0; }

.product-attrs-more-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px; padding: 7px 14px;
    background: #fff0f0; border: 1px solid #ffd4d4;
    border-radius: 8px; font-size: 13px; font-weight: 700;
    color: #f25e5e; text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.product-attrs-more-link:hover { background: #f25e5e; border-color: #f25e5e; color: white; }

.product-attrs-trust-split {
    display: grid; grid-template-columns: 1fr 1px 1fr;
    background: white; border: 1px solid #eee;
    border-radius: 14px; overflow: hidden; margin-top: 27px;
}
.product-attrs-trust-divider { background: #f0f0f0; width: 1px; }
.product-attrs-panel {
    padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
}
.product-trust-panel {
    padding: 14px 16px; display: flex; flex-direction: column;
    justify-content: space-between; gap: 0;
}
.product-trust-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 4px; border-bottom: 1px solid #f4f4f4;
    transition: background 0.15s; border-radius: 8px;
}
.product-trust-item:last-child { border-bottom: none; }
.product-trust-item:hover { background: #fafafa; }

/* ─── НИЖНИЙ БЛОК: описание + характеристики ─── */
.product-bottom {
    background: white; border: 1px solid #eee;
    border-radius: 16px; overflow: hidden;
}
.product-bottom-split { display: grid; grid-template-columns: 1fr 1fr; }
.product-bottom-col { padding: 28px 32px; }
.product-bottom-col + .product-bottom-col {
    border-left: 1px solid #f0f0f0; background: #fafafa;
}
.product-bottom-col-title {
    font-size: 13px; font-weight: 800; color: #aaa;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}
.product-description { font-size: 14px; line-height: 1.75; color: #444; white-space: pre-line; }

.product-attrs-full .attrs-group { margin-top: 20px; margin-bottom: 20px; }
.product-attrs-full .attrs-group-title {
    font-size: 11px; font-weight: 700; color: #aaa;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee;
}
.product-attrs-full .attrs-stripe-row  { border-radius: 0; }
.product-attrs-full .product-attrs-striped { border-radius: 8px; }
