/* Custom styles for Single Product Page based on product.html */

:root {
    --rey-container-spacing: 70px;
    --main-gutter-size: 70px;
    --body-bg-color: #ffffff;
    --neutral-hue: 210;
    --sticky-gs-top-bg-color: #ffffff;
    --blog-columns: 1;
    --sidebar-size: 25%;
    --post-align-wide-size: 25vw;
    --woocommerce-products-gutter: 30px;
    --woocommerce-sidebar-size: 16%;
    --woocommerce-thumbnails-padding-top: 0px;
    --woocommerce-thumbnails-padding-right: 0px;
    --woocommerce-thumbnails-padding-bottom: 0px;
    --woocommerce-thumbnails-padding-left: 0px;
    --woocommerce-fullscreen-summary-valign: flex-start;
    --woocommerce-summary-size: 48%;
    --woocommerce-summary-padding: 0px;
    --star-rating-color: #ff4545;
}

/* Core Layout Containers to match product.html structure */
body.single-product {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.rey-siteWrapper {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.rey-siteContent {
    flex: 1 0 auto;
    width: 100%;
}

.rey-siteContainer {
    max-width: 1440px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 70px !important;
    padding-right: 70px !important;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .rey-siteContainer {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

.rey-siteRow {
    width: 100%;
    display: flex !important;
    flex-direction: column;
}

.rey-siteMain {
    width: 100% !important;
    float: none !important;
}

/* Product Section */
.woocommerce div.product .rey-productSummary {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 4% !important;
    align-items: flex-start !important;
    padding-top: 50px !important;
    width: 100% !important;
    float: none !important;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
    float: none !important;
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .rey-productSummary {
        flex-direction: column;
        flex-wrap: wrap;
    }
}

/* Related Products Design */
.related.products {
    margin-top: 60px !important;
    padding: 0 40px !important;
    width: 100% !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    clear: both !important;
}

.related-products-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 30px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.__placeholders {
    display: flex !important;
}

.related-products-carousel .splide__slide {
    padding: 0 10px;
}

.__placeholder-item {
    cursor: pointer;
    width: 100% !important;
}

.__placeholder-thumb {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    background-color: #f5f5f5 !important;
    border-radius: 4px !important;
    margin-bottom: 12px !important;
    transition: opacity 0.3s ease;
}

.__placeholder-item:hover .__placeholder-thumb {
    opacity: 0.8;
}

.__placeholder-title {
    font-size: 14px !important;
    line-height: 1.2 !important;
    color: #000 !important;
    margin-bottom: 4px !important;
    font-weight: 600 !important;
}

.__placeholder-subtitle {
    font-size: 12px !important;
    color: #666 !important;
    margin-bottom: 4px !important;
}

.__placeholder-price {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #000 !important;
}

/* Splide Arrows Styling */
.related-products-carousel .splide__arrow {
    background: #231424 !important;
    border-radius: 0 !important;
    width: 40px !important;
    height: 40px !important;
    opacity: 0.6 !important;
    transition: opacity 0.3s !important;
}

.related-products-carousel .splide__arrow:hover {
    opacity: 1 !important;
}

.related-products-carousel .splide__arrow svg {
    fill: #fff !important;
}

.related-products-carousel .splide__arrow--prev {
    left: -40px !important;
}

.related-products-carousel .splide__arrow--next {
    right: -40px !important;
}


.summary.entry-summary {
    width: 48% !important;
    flex: 0 0 48% !important;
    position: sticky !important;
    top: 100px !important;
}

@media (max-width: 1024px) {
    .woocommerce-product-gallery,
    .summary.entry-summary {
        width: 100%;
        position: static;
    }
}

.rey-innerSummary {
    padding: 0;
}

.rey-breadcrumbs.--pdp-style {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.rey-breadcrumbs-item a {
    color: inherit;
    text-decoration: none;
}

.product_title.entry-title {
    font-size: 32px;
    margin-bottom: 10px;
    line-height: 1.2;
    font-weight: 700;
}

.rey-brandLink.--pdp {
    margin-bottom: 15px;
}

.rey-brandLink.--pdp a {
    font-weight: bold;
    color: #F3BB3A;
    text-decoration: none;
}

.price {
    font-size: 32px;
    color: #F3BB3A;
    margin-bottom: 20px;
}

.stock.in-stock {
    color: #19bf00;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.stock.in-stock svg {
    width: 18px;
    height: 18px;
}

/* Quantity and Cart Button */
.rey-cartBtnQty {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.rey-qtyField {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    width: fit-content;
    background: #fff;
}

.cartBtnQty-control {
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cartBtnQty-control:hover {
    background: #f5f5f5;
}

.cartBtnQty-control svg {
    width: 12px;
    height: 12px;
}

.qty {
    width: 50px;
    text-align: center;
    border: none;
    padding: 10px 0;
    font-weight: 600;
}

.single_add_to_cart_button, .iron_add_to_cart_button {
    background: #F3BB3A;
    color: #fff;
    padding: 15px 40px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.single_add_to_cart_button svg, .iron_add_to_cart_button svg {
    width: 20px;
    height: 20px;
}

/* Fix containment for sticky/fixed elements */
html, body {
    overflow-x: hidden !important;
}

#page, .rey-siteContainer, .rey-siteMain {
    transform: none !important;
    perspective: none !important;
    filter: none !important;
    contain: none !important;
}

/* Sticky Header Global - Forced */
header.rey-siteHeader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

/* Ensure content doesn't go under fixed header */
body {
    padding-top: 80px !important; /* Ajuste conforme a altura real do header */
}

/* Ensure popup is visible even with theme transforms */
body {
    perspective: none !important;
    transform: none !important;
}

/* Cart Notification Popup - Center Viewport */
.iron-cart-notification {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.8) !important;
    background: #F3BB3A !important;
    color: #ffffff !important;
    padding: 30px 50px !important;
    z-index: 2147483647 !important; /* Valor máximo possível para 32-bit int */
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 15px !important;
    pointer-events: none !important;
    min-width: 350px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.iron-cart-notification.--visible {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.iron-cart-notification .__content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
}

.iron-cart-notification .rey-icon {
    width: 50px !important;
    height: 50px !important;
    fill: #ffffff !important;
}

.iron-cart-notification span {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    white-space: normal !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    line-height: 1.3 !important;
}

.woocommerce-product-details__short-description {
    margin-top: 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

/* Panels Section */
.rey-wcPanels {
    margin-top: 80px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    border-top: 1px solid #eee;
    padding-top: 50px;
    margin-bottom: 80px;
}

.rey-wcPanel {
    flex: 1;
    min-width: 300px;
}

.rey-wcPanel h2 {
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: 700;
    text-transform: uppercase;
}

.shop_attributes {
    width: 100%;
    border-collapse: collapse;
}

.shop_attributes th {
    text-align: left;
    padding: 12px 0;
    width: 140px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.shop_attributes td {
    padding: 12px 0;
    font-style: normal;
    border-bottom: 1px solid #f0f0f0;
}

/* Gallery Cascade Grid (Exact product.html match) */
.woocommerce-product-gallery {
    opacity: 1 !important;
}

.woocommerce-product-gallery--cascade-grid .woocommerce-product-gallery__wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.woocommerce-product-gallery__image {
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    display: block !important;
}

.woocommerce-product-gallery__image a {
    display: block;
}

.woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    display: block;
    transition: transform 0.5s ease;
}

.woocommerce-product-gallery__image:hover img {
    transform: scale(1.05);
}

.__topWrapper {
    width: 100%;
}

/* Related Products Carousel Styles */
.rey-relatedProducts-wrapper {
    border-top: 1px solid #eee;
    padding-top: 60px;
    padding-bottom: 80px;
}

.rey-relatedProducts-wrapper h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.related.products ul.products {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding-bottom: 20px;
    scrollbar-width: none; /* Firefox */
}

.related.products ul.products::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.related.products ul.products li.product {
    flex: 0 0 22%;
    min-width: 250px;
}

@media (max-width: 1024px) {
    .related.products ul.products li.product {
        flex: 0 0 45%;
    }
}

@media (max-width: 767px) {
    .related.products ul.products li.product {
        flex: 0 0 80%;
    }
}
