.vpm-product {
    max-width: 1100px;
    margin: 0 auto !important;
    padding: 0 0 4rem 0 !important;
    color: #0f172a;
}

/* Remove extra spacing from Elementor/theme */
body.single-vpm_product .elementor-section-wrap > .elementor-section:first-child,
body.single-vpm_product .elementor-top-section:first-child,
body.single-vpm_product .site-content > .elementor:first-child,
body.single-vpm_product main > .elementor:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.single-vpm_product .vpm-product {
    margin-top: -150px !important;
}

/* Fix header spacing on mobile */
@media (max-width: 768px) {
    body.single-vpm_product .vpm-product {
        margin-top: -80px !important;
    }
}

.vpm-breadcrumbs {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vpm-breadcrumbs a {
    color: #6b7280;
    text-decoration: none;
}

.vpm-product__header {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 2.5rem;
}

@media (max-width: 960px) {
    .vpm-product__header {
        grid-template-columns: 1fr;
    }
}

/* OLD GALLERY STYLES - Replaced by new .vpm-hero and .vpm-gallery below */
/* Kept for backward compatibility if used elsewhere */
.vpm-gallery__hero {
    border-radius: 20px;
    overflow: hidden;
    background: #0f172a;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpm-gallery__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vpm-gallery__strip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.vpm-product__info {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.vpm-product__title {
    font-size: 2.125rem;
    font-weight: 700;
    margin: 0;
}

.vpm-product__meta {
    display: grid;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.vpm-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.vpm-meta-list li strong {
    font-weight: 700;
    color: #111827;
    margin-right: 0.35rem;
}

.vpm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.vpm-chip--selectable {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    background: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.vpm-chip--selectable.is-active {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.vpm-swatches {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.vpm-swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    border: 3px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vpm-swatch:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: #f97316;
}

/* Tooltip on hover */
.vpm-swatch::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(17, 24, 39, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tooltip arrow */
.vpm-swatch::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    border: 6px solid transparent;
    border-top-color: rgba(17, 24, 39, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9;
}

.vpm-swatch:hover::before,
.vpm-swatch:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.vpm-swatch.is-active {
    border-color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Image swatch specific styling */
.vpm-swatch--image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vpm-product__cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vpm-product__cta button {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #fff;
    padding: 1rem 1.4rem;
    border-radius: 16px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.25);
    transition: transform 0.2s ease;
}

.vpm-product__cta button:hover {
    transform: translateY(-2px);
}

.vpm-product__body {
    margin-top: 3rem;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
}

.vpm-product__description {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.vpm-product__description h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.5rem 0;
}

.vpm-product__content {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

.vpm-product__content p {
    margin-bottom: 1rem;
}

.vpm-product__content ul,
.vpm-product__content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.vpm-product__content li {
    margin-bottom: 0.5rem;
}

/* Mobile-First Responsive Table */
.vpm-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

/* Mobile: Card-based layout */
@media (max-width: 768px) {
    .vpm-spec-table {
        border: 0;
    }

    .vpm-spec-table thead {
        display: none;
    }

    .vpm-spec-table tbody,
    .vpm-spec-table tr {
        display: block;
        width: 100%;
    }

    .vpm-spec-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 1rem;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .vpm-spec-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
        padding: 0.6rem 0;
        border: none;
        font-size: 0.875rem;
        line-height: 1.4;
        gap: 1rem;
    }

    .vpm-spec-table td::before {
        content: attr(data-label);
        flex: 0 0 35%;
        font-weight: 700;
        font-size: 0.8rem;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    .vpm-spec-table td:first-child {
        font-weight: 700;
        font-size: 1.1rem;
        color: #f97316;
        padding-top: 0;
        padding-bottom: 0.75rem;
        margin-bottom: 0.5rem;
        border-bottom: 2px solid #f97316;
        justify-content: center;
    }

    .vpm-spec-table td:first-child::before {
        content: '# ';
        flex: 0 0 auto;
        font-size: 0.9rem;
        color: #f97316;
    }

    .vpm-spec-table td:last-child {
        padding-bottom: 0;
    }
}

/* Desktop: Normal table */
@media (min-width: 769px) {
    .vpm-spec-table th,
    .vpm-spec-table td {
        padding: 0.9rem 1rem;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
        font-size: 0.9rem;
    }

    .vpm-spec-table thead th {
        font-size: 0.8rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #6b7280;
        background: #f9fafb;
        font-weight: 700;
    }

    .vpm-spec-table tbody tr:hover {
        background: rgba(249, 115, 22, 0.08);
    }

    .vpm-spec-table th:first-child,
    .vpm-spec-table td:first-child {
        width: 50px;
        text-align: center;
    }
}

.vpm-spec-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vpm-spec-pagination button {
    border: 1px solid #d1d5db;
    background: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 38px;
}

.vpm-spec-pagination button.is-active,
.vpm-spec-pagination button:hover {
    border-color: #f97316;
    background: #f97316;
    color: #fff;
}

@media (max-width: 768px) {
    .vpm-spec-pagination button {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        min-width: 34px;
    }
}

.vpm-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 9999;
}

.vpm-modal.is-visible {
    display: flex;
}

.vpm-modal__content {
    background: #fff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.vpm-modal__close {
    position: absolute;
    inset-inline-end: 1.25rem;
    inset-block-start: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.vpm-modal form {
    display: grid;
    gap: 1rem;
}

.vpm-modal label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.vpm-modal input,
.vpm-modal textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
}

.vpm-modal button[type="submit"] {
    background: #111827;
    color: #fff;
    border-radius: 12px;
    border: none;
    padding: 0.85rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.vpm-modal__notice {
    font-size: 0.85rem;
    color: #047857;
}

.vpm-modal__error {
    color: #dc2626;
    font-size: 0.82rem;
}

/* OLD SIDEBAR STYLES - Kept for backward compatibility if used elsewhere */
.vpm-sidebar {
    position: relative;
    background: transparent;
    padding: 0;
    margin: 0;
    box-shadow: none;
    overflow: visible;
}

.vpm-sidebar__content {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    margin-bottom: 2rem;
}

.vpm-sidebar__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #111827;
    border-bottom: 2px solid #f97316;
    padding-bottom: 0.5rem;
}

/* VPM specific layout fixes */
.vpm-catalog {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* VPM elements positioning */
.vpm-sidebar,
.vpm-catalog,
.vpm-product {
    position: relative;
    overflow: visible;
}

/* ========================================
   LIGHTBOX STYLES
   ======================================== */

/* Lightbox container - full screen overlay */
.vpm-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.vpm-lightbox.is-visible {
    display: flex;
}

/* Dark overlay background */
.vpm-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

/* Lightbox content container */
.vpm-lightbox__container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10000;
}

/* Main lightbox image */
.vpm-lightbox__content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpm-lightbox__image {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Close button */
.vpm-lightbox__close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.vpm-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Navigation buttons */
.vpm-lightbox__prev,
.vpm-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.vpm-lightbox__prev:hover,
.vpm-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.vpm-lightbox__prev {
    left: -60px;
}

.vpm-lightbox__next {
    right: -60px;
}

/* Image counter */
.vpm-lightbox__counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 4px;
    white-space: nowrap;
}

.vpm-lightbox__current {
    font-weight: 600;
}

/* Prevent body scroll when lightbox is open */
body.vpm-lightbox-open {
    overflow: hidden;
}

/* Gallery hero cursor */
.vpm-gallery__hero-image {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.vpm-gallery__hero-image:hover {
    opacity: 0.95;
}

/* ========================================
   NEW LAYOUT STRUCTURE STYLES
   ======================================== */

/* Product container - main wrapper with sidebar */
.vpm-product-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
}

/* Hero and Quick Info Grid */
.vpm-product__main {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Hero Section (Image Gallery) */
.vpm-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vpm-hero__image-container {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: #f9fafb;
    cursor: pointer;
}

.vpm-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vpm-hero__image-container:hover .vpm-hero__image {
    transform: scale(1.05);
}

/* Gallery Thumbnails */
.vpm-gallery {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.vpm-gallery__thumb {
    flex: 0 0 80px !important;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block !important;
}

.vpm-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vpm-gallery__thumb.is-active {
    border-color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.vpm-gallery__thumb:hover {
    border-color: #fb923c;
    transform: translateY(-2px);
}

/* Quick Info Section */
.vpm-quick {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vpm-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.vpm-quick__meta {
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 12px;
}

/* Variants Section */
.vpm-variants {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vpm-variants__title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.vpm-variants__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* CTA Section */
.vpm-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vpm-cta__button {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.vpm-cta__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.4);
}

.vpm-cta__summary {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
}

/* Product Body Section */
.vpm-product__body {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

/* Specs Section */
.vpm-specs {
    width: 100%;
}

.vpm-specs-wrap {
    overflow-x: auto;
}

/* Description Section */
.vpm-description {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.vpm-description__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.25rem 0;
}

.vpm-description__content {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

.vpm-description__content p {
    margin-bottom: 1rem;
}

/* Categories Sidebar */
.vpm-categories {
    position: relative;
}

.vpm-categories__content {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 100px;
}

.vpm-categories__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f97316;
}

.vpm-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vpm-category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #374151;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vpm-category-list li a:hover {
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
    transform: translateX(4px);
}

.vpm-category-list .count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .vpm-product-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1.5rem 3rem 1.5rem;
    }

    .vpm-categories__content {
        position: static;
    }
}

@media (max-width: 768px) {
    .vpm-product__main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .vpm-hero__image-container {
        height: 300px;
    }

    .vpm-title {
        font-size: 1.5rem;
    }

    .vpm-product__body {
        padding: 1.5rem;
    }

    .vpm-categories__content {
        padding: 1.25rem;
    }

    .vpm-lightbox__prev {
        left: 10px;
    }

    .vpm-lightbox__next {
        right: 10px;
    }

    .vpm-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .vpm-lightbox__counter {
        bottom: 10px;
    }

    .vpm-lightbox__image {
        max-width: 95vw;
        max-height: 80vh;
    }
}



/* Cloudflare Turnstile Widget */
.vpm-modal__captcha {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.cf-turnstile {
    margin: 0 auto;
    max-width: 100%;
}

/* Mobile form fixes */
@media (max-width: 480px) {
    .vpm-modal__content {
        max-width: 95vw;
        padding: 1.5rem 1rem;
        margin: 0 1rem;
    }

    .vpm-modal input,
    .vpm-modal textarea {
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .vpm-modal__captcha {
        margin: 1rem -0.5rem;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .cf-turnstile {
        transform: scale(0.85);
        transform-origin: left center;
    }
}
