/* ============================================================
   VIVA Single Product Page – v1.0
   ============================================================ */

.viva-single-wrap {
    /* no overflow clip here – gallery needs sticky to work */
}

.viva-sp {
    max-width: 1440px;
    width: 92%;
    margin: 0 auto;
    padding: 40px 0 60px;
    box-sizing: border-box;
}

/* ── Two-column main ──────────────────────────────────────── */
.viva-sp__main {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 60px;
    align-items: start;
}

/* ── Gallery ─────────────────────────────────────────────── */
.viva-sp__gallery {
    position: sticky;
    top: 80px;
}
.admin-bar .viva-sp__gallery { top: 112px; }

.viva-sp__gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f8f8;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viva-sp__main-img {
    max-width: calc(100% - 48px);
    max-height: calc(100% - 48px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

.viva-sp__thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.viva-sp__thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: #f8f8f8;
    padding: 4px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s;
    overflow: hidden;
}
.viva-sp__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.viva-sp__thumb.is-active,
.viva-sp__thumb:hover { border-color: #c63fe8; }

/* ── Info panel ──────────────────────────────────────────── */
.viva-sp__info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.viva-sp__breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #aaa;
}
.viva-sp__breadcrumb a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}
.viva-sp__breadcrumb a:hover { color: #c63fe8; }
.viva-sp__breadcrumb span { color: #555; }

.viva-sp__name {
    font-size: 30px;
    font-weight: 700;
    color: #1d1d1d;
    margin: 0;
    line-height: 1.25;
    font-family: Manrope, sans-serif;
}

/* Price: override global size on single product page */
.viva-sp__price .viva-price-poa {
    font-size: 17px;
    font-style: normal;
    font-weight: 500;
    color: #888;
}
.viva-sp__price .viva-price-tag {
    font-size: 17px;
    font-weight: 600;
}
.viva-sp__price .viva-price-tag .woocommerce-Price-amount {
    font-size: 17px;
    font-weight: 600;
}

.viva-sp__short-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.viva-sp__short-desc p { margin: 0 0 8px; }
.viva-sp__short-desc p:last-child { margin-bottom: 0; }

.viva-sp__sku {
    font-size: 13px;
    color: #aaa;
    margin: 0;
}
.viva-sp__sku span { color: #666; }

/* Attributes table */
.viva-sp__attrs {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}
.viva-sp__attrs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.viva-sp__attrs-table tr { border-bottom: 1px solid #f0f0f0; }
.viva-sp__attrs-table tr:last-child { border-bottom: none; }
.viva-sp__attrs-table th {
    text-align: left;
    font-weight: 600;
    color: #555;
    padding: 10px 14px;
    width: 42%;
    background: #fafafa;
    vertical-align: top;
}
.viva-sp__attrs-table td {
    color: #1d1d1d;
    padding: 10px 14px;
}

/* Swatches */
.viva-sp__swatches-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 0 0 8px;
}

/* Action (reuses .viva-atq-row / .viva-qty-wrap / .viva-atq-btn from woo-shop.css) */
.viva-sp__action .viva-atq-btn,
.viva-sp__action a.viva-atq-btn {
    padding: 13px 22px !important;
    font-size: 14px !important;
}
.viva-sp__action .viva-qty-btn {
    height: 40px;
    width: 34px;
}
.viva-sp__action .viva-atq-qty {
    font-size: 14px;
    width: 44px;
}

/* ── Tabs section ─────────────────────────────────────────── */
.viva-sp__tabs-section {
    margin-top: 60px;
    border-top: 1px solid #e8e8e8;
    padding-top: 40px;
}

.viva-sp__tabs-section .woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e8e8e8;
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.viva-sp__tabs-section .woocommerce-tabs ul.tabs::before,
.viva-sp__tabs-section .woocommerce-tabs ul.tabs::after { display: none !important; }
.viva-sp__tabs-section .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}
.viva-sp__tabs-section .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.viva-sp__tabs-section .woocommerce-tabs ul.tabs li.active a,
.viva-sp__tabs-section .woocommerce-tabs ul.tabs li a:hover {
    color: #1d1d1d;
    border-bottom-color: #1d1d1d;
}
.viva-sp__tabs-section .woocommerce-tabs .panel {
    font-size: 15px;
    color: #444;
    line-height: 1.75;
    max-width: 780px;
}
.viva-sp__tabs-section .woocommerce-tabs .panel h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}

/* WooCommerce additional information table */
.viva-sp__tabs-section table.shop_attributes {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    max-width: 600px;
}
.viva-sp__tabs-section table.shop_attributes th {
    font-weight: 600;
    color: #555;
    padding: 8px 12px 8px 0;
    text-align: left;
    width: 40%;
}
.viva-sp__tabs-section table.shop_attributes td {
    color: #1d1d1d;
    padding: 8px 0;
}
.viva-sp__tabs-section table.shop_attributes tr {
    border-bottom: 1px solid #f0f0f0;
}

/* ── Related products ─────────────────────────────────────── */
.viva-sp .related.products ul.products::before,
.viva-sp .related.products ul.products::after,
.viva-sp .upsells.products ul.products::before,
.viva-sp .upsells.products ul.products::after {
    content: none !important;
    display: none !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .viva-sp__main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .viva-sp__gallery {
        position: static;
    }
    .viva-sp__name { font-size: 24px; }
    .viva-sp__tabs-section { margin-top: 40px; padding-top: 30px; }
}

@media (max-width: 480px) {
    .viva-sp { padding: 24px 0 40px; }
    .viva-sp__name { font-size: 22px; }
    .viva-sp__action .viva-atq-row { flex-wrap: wrap; }
    .viva-sp__action .viva-qty-wrap { width: 100%; justify-content: center; }
    .viva-sp__action .viva-atq-btn,
    .viva-sp__action a.viva-atq-btn { width: 100% !important; }
}
