/* ============================================================
   VENDARA — Product Page CSS
   Подключается на /product/{slug}
   ============================================================ */

/* ── Breadcrumb ───────────────────────────────────────────── */
.product-page { padding: 20px 0 64px; }

/* ── Top block ────────────────────────────────────────────── */
.product-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

/* ── Gallery ──────────────────────────────────────────────── */
.product-gallery { position: sticky; top: 82px; }

.product-gallery__main {
    position: relative;
    aspect-ratio: 1;
    background: var(--vd-white);
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-md);
    overflow: hidden;
    cursor: zoom-in;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform 0.3s ease;
    font-size: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-gallery__main:hover .product-gallery__main-img { transform: scale(1.05); }

.product-gallery__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.product-gallery__zoom {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--vd-transition);
    color: var(--vd-muted);
}
.product-gallery__zoom:hover { background: #fff; color: var(--vd-brand); border-color: var(--vd-brand); }

.product-gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.product-gallery__thumbs::-webkit-scrollbar { display: none; }

.product-gallery__thumb {
    width: 68px;
    height: 68px;
    border-radius: var(--vd-radius-sm);
    border: 2px solid var(--vd-border);
    background: var(--vd-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
    transition: border-color var(--vd-transition);
}
.product-gallery__thumb:hover  { border-color: var(--vd-brand-mid); }
.product-gallery__thumb--active { border-color: var(--vd-brand); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

/* ── Lightbox ─────────────────────────────────────────────── */
.product-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--vd-transition-slow);
}
.product-lightbox--open { opacity: 1; visibility: visible; }
.product-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    font-size: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background var(--vd-transition);
}
.product-lightbox__close:hover { background: rgba(255,255,255,0.22); }

/* ── Product info ─────────────────────────────────────────── */
.product-info {}

.product-info__brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--vd-brand);
    margin-bottom: 8px;
    text-decoration: none;
    transition: color var(--vd-transition);
}
.product-info__brand:hover { color: var(--vd-brand-dark); }

.product-info__title {
    font-family: var(--vd-font-display);
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: var(--vd-ink);
    line-height: 1.3;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.product-info__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--vd-muted);
    font-weight: 600;
}
.product-info__sku { }
.product-info__avail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}
.product-info__avail--yes { color: var(--vd-green); }
.product-info__avail--no  { color: var(--vd-red); }
.product-info__avail--order { color: var(--vd-yellow); }
.avail-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* Price block */
.product-price-block {
    padding: 20px;
    background: var(--vd-surface);
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-md);
    margin-bottom: 20px;
}
.product-price-block__old {
    font-size: 14px;
    color: var(--vd-muted);
    text-decoration: line-through;
    margin-bottom: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.product-price-block__discount {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    background: var(--vd-brand);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}
.product-price-block__price {
    font-family: var(--vd-font-display);
    font-size: 32px;
    font-weight: 900;
    color: var(--vd-ink);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.product-price-block__vat {
    font-size: 12px;
    color: var(--vd-muted);
    font-weight: 600;
}

/* Delivery info */
.product-delivery {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--vd-white);
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
}
.product-delivery__icon { color: var(--vd-brand); flex-shrink: 0; margin-top: 1px; }
.product-delivery__text { color: var(--vd-text); font-weight: 600; line-height: 1.5; }
.product-delivery__text strong { color: var(--vd-ink); }

/* Qty + cart */
.product-actions { display: flex; flex-direction: column; gap: 10px; }

.product-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.product-qty-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--vd-muted);
    white-space: nowrap;
}
.product-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-sm);
    overflow: hidden;
}
.product-qty__btn {
    width: 40px;
    height: 44px;
    border: none;
    background: var(--vd-surface);
    color: var(--vd-text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--vd-transition), color var(--vd-transition);
    font-weight: 700;
    line-height: 1;
}
.product-qty__btn:hover { background: var(--vd-brand-light); color: var(--vd-brand); }
.product-qty__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.product-qty__input {
    width: 56px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--vd-border);
    border-right: 1px solid var(--vd-border);
    text-align: center;
    font-family: var(--vd-font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--vd-ink);
    outline: none;
    background: var(--vd-white);
}
.product-qty__input::-webkit-outer-spin-button,
.product-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-cart-btn {
    width: 100%;
    height: 52px;
    background: var(--vd-brand);
    color: #fff;
    border: none;
    border-radius: var(--vd-radius);
    font-family: var(--vd-font-body);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background var(--vd-transition), transform var(--vd-transition), box-shadow var(--vd-transition);
}
.product-cart-btn:hover {
    background: var(--vd-brand-dark);
    transform: translateY(-1px);
    box-shadow: var(--vd-shadow-brand);
}
.product-cart-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.product-cart-btn--added { background: var(--vd-green); }
.product-cart-btn--added:hover { background: #15803D; }

.product-fav-btn {
    width: 100%;
    height: 44px;
    background: transparent;
    color: var(--vd-muted);
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius);
    font-family: var(--vd-font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--vd-transition);
}
.product-fav-btn:hover, .product-fav-btn--active {
    border-color: var(--vd-brand);
    color: var(--vd-brand);
    background: var(--vd-brand-light);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.product-tabs { margin-bottom: 40px; }

.product-tabs__nav {
    display: flex;
    border-bottom: 2px solid var(--vd-border);
    margin-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.product-tabs__nav::-webkit-scrollbar { display: none; }

.product-tabs__btn {
    padding: 14px 22px;
    border: none;
    background: transparent;
    font-family: var(--vd-font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--vd-muted);
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color var(--vd-transition), border-color var(--vd-transition);
}
.product-tabs__btn:hover { color: var(--vd-brand); }
.product-tabs__btn--active { color: var(--vd-brand); border-bottom-color: var(--vd-brand); }

.product-tabs__panel {
    background: var(--vd-white);
    border: 1.5px solid var(--vd-border);
    border-top: none;
    border-radius: 0 0 var(--vd-radius-md) var(--vd-radius-md);
    padding: 28px;
    display: none;
}
.product-tabs__panel--active { display: block; }

/* Description */
.product-description {
    font-size: 15px;
    color: var(--vd-text);
    line-height: 1.8;
    max-width: 760px;
}
.product-description p  { margin-bottom: 14px; }
.product-description p:last-child { margin-bottom: 0; }
.product-description ul, .product-description ol {
    margin: 0 0 14px 20px;
}
.product-description li { margin-bottom: 6px; }
.product-description strong { color: var(--vd-ink); font-weight: 700; }

/* Specs table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    max-width: 760px;
}
.specs-table tr { border-bottom: 1px solid var(--vd-border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table tr:hover { background: var(--vd-surface); }
.specs-table td {
    padding: 11px 14px;
    vertical-align: top;
}
.specs-table td:first-child {
    color: var(--vd-muted);
    font-weight: 600;
    width: 40%;
    font-size: 13px;
}
.specs-table td:last-child {
    color: var(--vd-ink);
    font-weight: 600;
}
.specs-group {
    margin-bottom: 24px;
}
.specs-group:last-child { margin-bottom: 0; }
.specs-group__title {
    font-family: var(--vd-font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--vd-muted);
    margin-bottom: 6px;
    padding: 0 14px;
}

/* Docs list */
.product-docs { display: flex; flex-direction: column; gap: 10px; }
.product-doc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-sm);
    transition: border-color var(--vd-transition);
}
.product-doc:hover { border-color: var(--vd-brand-mid); }
.product-doc__info { display: flex; align-items: center; gap: 12px; }
.product-doc__icon { font-size: 24px; }
.product-doc__name { font-size: 14px; font-weight: 700; color: var(--vd-ink); }
.product-doc__size { font-size: 12px; color: var(--vd-muted); margin-top: 1px; font-weight: 600; }
.product-doc__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    background: var(--vd-surface);
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-sm);
    font-family: var(--vd-font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--vd-text);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--vd-transition);
}
.product-doc__btn:hover { border-color: var(--vd-brand); color: var(--vd-brand); background: var(--vd-brand-light); }

/* ── Related products ─────────────────────────────────────── */
.related-section { }
.related-section__title {
    font-family: var(--vd-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--vd-ink);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.related-section__title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 22px;
    background: var(--vd-brand);
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .product-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
    .product-top { grid-template-columns: 1fr; gap: 20px; }
    .product-gallery { position: static; }
    .product-info__title { font-size: 20px; }
    .product-price-block__price { font-size: 26px; }
    .product-tabs__panel { padding: 18px; }
}

@media (max-width: 480px) {
    .product-page { padding: 12px 0 48px; }
    .product-gallery__thumb { width: 56px; height: 56px; font-size: 22px; }
    .product-tabs__btn { padding: 12px 14px; font-size: 13px; }
}
