/**
 * Puerta Roja - Single Product Styles
 * Inspired by Platanomelon
 */

/* Container & Grid */
.pr-single-product-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.pr-single-product-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 60px;
    align-items: start;
}

/* =============================================
   Gallery – Swiper Overrides (.pr-gallery)
   ============================================= */

.pr-product-gallery-column {
    position: sticky;
    top: 100px;
    min-width: 0;
    /* Prevents grid blowout */
    overflow: hidden;
    /* Safety net */
}

/* Main container */
.pr-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: #f4f4f4;
    overflow: hidden;
}

/* Slides */
.pr-gallery .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Pagination Dots ---- */
.pr-gallery .pr-gallery__pagination {
    position: absolute;
    bottom: 20px !important;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.pr-gallery .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    border-radius: 50%;
    margin: 0 !important;
    transition: background 0.2s ease;
}

.pr-gallery .swiper-pagination-bullet-active {
    background: #fff;
}

/* ---- Navigation Arrows ---- */
.pr-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #4343ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    margin-top: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

/* Hide Swiper's default ::after arrows */
.pr-gallery__arrow::after {
    display: none;
}

.pr-gallery:hover .pr-gallery__arrow {
    opacity: 1;
}

.pr-gallery__arrow:hover {
    transform: translateY(-50%) scale(1.08);
}

.pr-gallery__arrow--prev {
    left: 16px;
}

.pr-gallery__arrow--next {
    right: 16px;
}

.pr-gallery__arrow svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 2. Info Column (Left on Desktop) */
.pr-product-info-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Breadcrumbs */
.pr-product-breadcrumb {
    font-size: 13px;
    color: var(--pr-color-text-light);
    margin-bottom: 8px;
}

/* Title & Subtitle */
.pr-product-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin: 12px 0 8px;
    color: #000;
}

.pr-product-subtitle {
    font-size: 16px;
    color: var(--pr-color-text-light);
    line-height: 1.4;
}

/* Price */
.pr-product-price-box .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--pr-color-secondary) !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pr-product-price-box .price del {
    font-size: 18px;
    color: #c0c0c0;
    font-weight: 400;
}

.pr-product-price-box .price ins {
    text-decoration: none;
}

/* Add to Cart */
.pr-product-add-to-cart-box {
    margin: 20px 0;
}

.pr-product-add-to-cart-box .single_add_to_cart_button {
    background-color: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 18px 40px !important;
    font-size: 16px !important;
    letter-spacing: 0.5px;
    font-weight: 700 !important;
    width: 100%;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.pr-product-add-to-cart-box .single_add_to_cart_button:hover {
    background-color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pr-product-add-to-cart-box .quantity {
    display: none !important;
    /* Quantity is usually in a cleaner selector or hidden in Platanomelon for main CTA */
}

/* Quick Features Icons */
.pr-product-quick-features {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.pr-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.pr-feature-item .dashicons {
    color: #4343ff;
    font-size: 18px;
}

/* Description Text */
.pr-product-description-text {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

/* Accordions */
.pr-product-accordions {
    margin-top: 40px;
}

.pr-accordions-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.pr-accordion-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.pr-accordion-item summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pr-accordion-item summary::-webkit-details-marker {
    display: none;
}

.pr-accordion-item summary:after {
    content: '+';
    font-size: 20px;
    color: #4343ff;
}

.pr-accordion-item[open] summary:after {
    content: '-';
}

.pr-accordion-content {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Sticky Buy Bar */
.pr-sticky-buy-bar {
    position: fixed;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 998;
    /* Under header (999) */
    padding: 12px 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pr-sticky-buy-bar.is-visible {
    transform: translateY(0);
}

/* Desktop Logic: Top Sticky */
@media (min-width: 769px) {
    .pr-sticky-buy-bar {
        top: 80px;
        /* Height of the main header */
        transform: translateY(-110%);
        /* Slide it cleanly under the header */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        opacity: 0;
        visibility: hidden;
    }

    body.admin-bar .pr-sticky-buy-bar {
        top: 112px;
        /* 80px + 32px admin bar */
    }

    .pr-sticky-buy-bar.is-visible {
        transform: translateY(0);
        /* Rest right below the header */
        opacity: 1;
        visibility: visible;
    }
}



/* Mobile Logic: Bottom Sticky */
@media (max-width: 768px) {
    .pr-sticky-buy-bar {
        bottom: 0;
        transform: translateY(100%);
    }

    .pr-sticky-buy-bar.is-visible {
        transform: translateY(0);
    }
}

.pr-sticky-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.pr-sticky-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pr-sticky-thumb {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}

.pr-sticky-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.pr-sticky-price {
    font-size: 13px;
    color: #e62a29;
    font-weight: 700;
}

.pr-sticky-action .pr-button-shopify {
    background: #111 !important;
    color: #fff !important;
    cursor: pointer;
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 30px;
}

/* Responsive Stacking */
@media (max-width: 768px) {
    .pr-single-product-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pr-product-gallery-column {
        order: -1;
        /* Gallery top */
        position: static;
    }

    .pr-product-title {
        font-size: 28px;
    }

    .pr-single-product-container {
        margin: 20px auto;
    }
}

/* =============================================
   Remove WooCommerce default sidebar on single product
   ============================================= */
.single-product .widget-area,
.single-product #secondary,
.single-product aside.sidebar {
    display: none !important;
}

/* Ensure WooCommerce content takes full width (no sidebar gap) */
.single-product .content-area,
.single-product #primary,
.single-product .woocommerce {
    width: 100% !important;
    float: none !important;
}

.pr-gallery__arrow {
    width: 44px !important;
    height: 44px !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

.pr-gallery__arrow svg {
    width: 20px !important;
    height: 20px !important;
}

.pr-gallery__arrow.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: default !important;
}

/* WhatsApp Product Button */
.woocommerce div.product form.cart .button {
    float: unset !important;
}

.pr-whatsapp-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25D366;
    color: #fff !important;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pr-whatsapp-product-btn:hover {
    background-color: #20b858;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.pr-whatsapp-product-btn svg {
    flex-shrink: 0;
}

.pr-product-related-section {
    margin-top: 60px;
}

.pr-product-related-section>.related>h2 {
    margin-bottom: 30px;
}