/**
* Theme Name: Supgor Child
* Description: This is a child theme of Supgor, generated by Merlin WP.
* Author: <a href="http://themeforest.net/user/KlbTheme">KlbTheme (Sinan ISIK)</a>
* Template: supgor
* Version: 1.0.0
*/

/* --- Gallery Width Fix (100% Width) --- */
.single-product-wrapper .product .product-gallery-column .product-gallery img,
.rtwpvg-images,
.rtwpvg-images-wrapper,
.rtwpvg-container,
.rtwpvg-wrapper,
.rtwpvg-slider,
.rtwpvg-item,
.rtwpvg-gallery,
.rtwpvg-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* --- 3-Column Layout Restoration --- */
@media screen and (min-width: 1024.02px) {
    .product-body-three-column {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 2.5% !important;
    }

    .product-body-three-column .product-gallery-column {
        width: 45% !important;
        flex: 0 0 45% !important;
    }

    .product-body-three-column .product-detail-column {
        width: 34% !important;
        flex: 0 0 34% !important;
    }

    .product-body-three-column .product-related-column {
        width: 16% !important;
        flex: 0 0 16% !important;
        border-left: 1px solid #eee;
        padding-left: 15px;
    }
}

/* --- Related Products Vertical Slider v4.0 --- */
.product-related-slider .sidebar-slider {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-related-slider .swiper-container {
    height: 600px !important;
    width: 100% !important;
    overflow: hidden;
}

.product-related-slider ul.products.swiper-wrapper {
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product-related-slider li.product.swiper-slide {
    height: auto !important;
    margin-bottom: 20px !important;
    padding: 10px !important;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.product-related-slider li.product.swiper-slide .product-media {
    max-width: 150px;
    margin: 0 auto 10px;
}

.product-related-slider li.product.swiper-slide .product-title {
    font-size: 0.75rem !important;
    font-family: inherit !important;
    margin: 5px 0 !important;
}

.product-related-slider li.product.swiper-slide .price {
    font-size: 0.8rem !important;
}

/* Remove Borders from Variation Labels */
.product-related-slider .variations tr th,
.product-related-slider .variations tr td,
.product-related-slider .variations label,
.product-related-slider .variations {
    border: none !important;
    padding: 2px 0 !important;
    background: transparent !important;
}

/* --- Global Variation Label Fix (Remove Borders) --- */
form.variations_form label,
.variations tr th,
.variations tr td,
.variations label,
.variations {
    border: none !important;
    padding: 2px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Hide variation form/swatches on product grids (Category, Shop, etc.) */
.products .product.product-type-variable form.variations_form,
ul.products li.product-type-variable form.variations_form {
    display: none !important;
}

/* Hide the redundant Weight meta at the bottom of the card */
.products .product .klb-extra-information,
.products .product .woocommerce-product-attributes,
.products .product .woocommerce-product-attributes-item--weight,
.products .product .woocommerce-product-attributes-item--attribute_pa_weight,
.product-inner .klb-extra-information,
.product-inner .woocommerce-product-attributes,
.product-inner .woocommerce-product-attributes-item--weight,
.product-inner .woocommerce-product-attributes-item--attribute_pa_weight,
.products .product .product-footer .klb-extra-information {
    display: none !important;
}

/* Hide swatches in the Related Products sidebar (Use Modal instead) */
.product-related-slider .supgor-swatches-wrapper {
    display: none !important;
}

/* Make 'Add to Cart' button full width in sidebar for easier clicking */
.product-related-slider .add_to_cart_button {
    width: 100% !important;
    text-align: center !important;
}

/* --- Variation Swatches (Buttons) v1.3 --- */
.supgor-swatches-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center; /* Center buttons on category pages */
    margin-bottom: 15px;
}

/* Ensure single product page keeps left alignment for swatches */
.single-product .supgor-swatches-wrapper {
    justify-content: flex-start !important;
}

.supgor-swatch {
    cursor: pointer;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    min-width: 50px;
    text-align: center;
    user-select: none;
}

.supgor-swatch:hover {
    border-color: #000;
    background: #f9f9f9;
}

.supgor-swatch.active {
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 1px #000;
}

/* --- Quick Add Modal Styles --- */
.supgor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.supgor-modal.active {
    display: flex;
}

.supgor-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.supgor-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
    animation: supgor-modal-in 0.3s ease-out;
}

@keyframes supgor-modal-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.supgor-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f1f1;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s;
}

.supgor-modal-close:hover {
    background: #e1e1e1;
}

.supgor-modal-product-data h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.3;
    color: #111;
    font-weight: 700;
}

.supgor-modal-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 25px;
}

.supgor-modal-variation-form-wrapper {
    margin-bottom: 20px;
}

.supgor-modal-footer-links {
    margin-top: 30px;
    text-align: center;
}

.view-details-link {
    font-size: 0.9rem;
    color: #888;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    transition: color 0.2s;
}

.view-details-link:hover {
    color: #000;
}

/* Modal specific Swatch override */
.supgor-modal-product-data .supgor-swatch {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Modal Button Styling */
.supgor-modal-product-data .single_add_to_cart_button,
.supgor-modal-product-data .button.alt,
.supgor-modal-product-data .buy_now_button {
    background-color: #2d5a27 !important; /* Premium Brand Green */
    color: #fff !important;
    padding: 12px 25px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.95rem !important;
    border: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.2) !important;
}

.supgor-modal-product-data .single_add_to_cart_button:hover {
    background-color: #3d7a35 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.3) !important;
}

/* Specific styling for Buy Now if it exists as a separate class */
.supgor-modal-product-data .buy_now_button {
    background-color: #e67e22 !important; /* Standout Orange/Gold */
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2) !important;
}

.supgor-modal-product-data .buy_now_button:hover {
    background-color: #d35400 !important;
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.3) !important;
}

/* Alignment for buttons in modal */
.supgor-modal-product-data .woocommerce-variation-add-to-cart {
    display: grid !important;
    grid-template-columns: auto 1fr !important; /* Qty and Add to Cart on same row */
    gap: 12px !important;
    align-items: center !important;
    margin-top: 20px !important;
}

.supgor-modal-product-data .buy_now_button {
    background-color: #e67e22 !important; /* Standout Orange/Gold */
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2) !important;
    grid-column: 1 / -1 !important; /* Force to its own full-width row */
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
}

.supgor-modal-product-data .single_add_to_cart_button {
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
}

/* Loader Styling */
.supgor-modal-loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: supgor-spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes supgor-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
    .supgor-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .products .product form.variations_form {
        padding: 5px 0 !important;
    }
    
    .supgor-swatch {
        padding: 4px 10px;
        font-size: 0.7rem;
        min-width: 40px;
    }
    
    .products .product .product_title {
        font-size: 0.9rem !important;
    }
}

.supgor-swatch:hover {
    border-color: #000;
    background: #f9f9f9;
}

.supgor-swatch.active {
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 1px #000;
}

/* Specific styling for Attribute Labels above swatches */
.variations tr th {
    padding-bottom: 5px !important;
    display: block !important;
    text-align: left;
    font-weight: bold;
    font-size: 0.95rem;
    color: #000;
}


/* Improve Arrow Controls (Top/Bottom) */
.slider-top, .slider-bottom {
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.product-related-slider .swiper-button-prev,
.product-related-slider .swiper-button-next {
    position: static !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    color: #333 !important;
    background: #f0f0f0;
    border-radius: 50%;
}

.product-related-slider .swiper-button-prev:after,
.product-related-slider .swiper-button-next:after {
    font-size: 10px !important;
    font-weight: bold;
}

.product-related-slider .swiper-button-prev:after { content: 'prev'; transform: rotate(90deg); }
.product-related-slider .swiper-button-next:after { content: 'next'; transform: rotate(270deg); }

/* --- Tabs 100% Width Fix --- */
.single-product-wrapper .product {
    display: block !important;
}

.single-product-tabs-wrapper {
    clear: both !important;
    width: 100% !important;
    display: block !important;
    margin-top: 40px !important;
}

/* Mobile adjustments */
@media screen and (max-width: 1024.01px) {
    .product-related-column {
        margin-top: 40px;
        border-top: 1px solid #eee;
        padding-top: 30px;
    }
}

/* --- Attractive Social Media Buttons --- */
.site-social {
    gap: 12px !important;
}

.site-social li {
    margin-bottom: 12px !important;
}

.site-social li a {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}

.site-social li a:hover {
    transform: translateX(8px) !important;
    filter: brightness(1.15) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

.site-social li a i {
    font-size: 1.2rem !important;
    margin-right: 15px !important;
    width: 24px;
    text-align: center;
}

.site-social li a .social-label {
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.9rem !important;
}

.site-social li a .social-value {
    margin-left: auto !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    text-transform: uppercase;
}

/* Specific Brands - Forcing colors */
.site-social li a.facebook {
    background: #1877F2 !important;
}

.site-social li a.youtube {
    background: #FF0000 !important;
}

.site-social li a.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%) !important;
}

.site-social li a.linkedin {
    background: #0A66C2 !important;
}

.site-social li a.twitter {
    background: #000000 !important;
}

.site-social li a.whatsapp {
    background: #25D366 !important;
}

/* Ensure icons are white */
.site-social li a i {
    color: #fff !important;
}

/* --- TOTAL WEIGHT DISPLAY STYLING --- */
.cart-total-weight th {
    font-weight: 700 !important;
    color: #111 !important;
}

.cart-total-weight td {
    text-align: right !important;
    color: #2d5a27 !important; /* Reuse the brand green */
}

.total-weight-label {
    display: inline-block;
}

@media screen and (max-width: 768px) {
    .cart-total-weight th, 
    .cart-total-weight td {
        font-size: 0.85rem !important;
    }
}

/*/* --- Premium Checkout Button: Glass & Jelly Design --- */
.wc-block-cart__submit-button,
.wc-block-checkout__proceed-to-checkout,
.wc-block-components-checkout-place-order-button,
.wc-block-components-button.wc-block-cart__submit-button,
.wc-block-components-button.wc-block-components-checkout-place-order-button {
    background: rgba(45, 90, 39, 0.85) !important; /* Semi-transparent Brand Green */
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 50px !important;
    padding: 14px 40px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #fff !important;
    box-shadow: 0 10px 35px rgba(45, 90, 39, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6) !important; /* Jelly/Bouncy Transition */
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    width: auto !important;
    min-width: 240px !important;
    margin: 25px auto 0 !important; /* Centered with top margin */
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-size: 0.95rem !important;
}

/* Glass Shine & Jelly Squish */
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button.wc-block-cart__submit-button:hover,
.wc-block-components-button.wc-block-components-checkout-place-order-button:hover {
    transform: scale(1.04) translateY(-5px) !important;
    background: rgba(45, 90, 39, 1) !important;
    box-shadow: 0 15px 45px rgba(45, 90, 39, 0.45) !important;
    color: #fff !important;
}

.wc-block-cart__submit-button:active,
.wc-block-components-checkout-place-order-button:active,
.wc-block-components-button.wc-block-cart__submit-button:active,
.wc-block-components-button.wc-block-components-checkout-place-order-button:active {
    transform: scale(0.94) !important;
    transition: all 0.1s ease !important;
}

/* Glossy Internal Glow */
.wc-block-cart__submit-button::before,
.wc-block-components-checkout-place-order-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

/* Animated Shine Sweep */
.wc-block-cart__submit-button::after,
.wc-block-components-checkout-place-order-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.6s;
}

.wc-block-cart__submit-button:hover::after,
.wc-block-components-checkout-place-order-button:hover::after {
    left: 100%;
}

/* Fix for WooCommerce Block button wrappers */
.wc-block-cart__submit {
    padding: 0 !important;
    margin: 0 !important;
}

/* --- MODERN CART ARRANGEMENTS & STYLING --- */

/* 1. Item Card Layout (Tightened for "Half Size" feel) */
.wc-block-cart-item {
    background: #ffffff !important;
    border: 1px solid #f2f2f2 !important;
    border-radius: 14px !important;
    padding: 10px 16px !important; /* Extremely tight padding */
    margin-bottom: 10px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s ease !important;
    display: grid !important;
    grid-template-columns: 85px 1fr auto !important; /* Smaller image space */
    gap: 12px !important;
    align-items: center !important; /* Vertically center content */
    min-height: auto !important;
}

.wc-block-cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    border-color: #2D5A27 !important;
}

/* 1.1 Item Info Container (Flex Row Alignment) */
.wc-block-cart-item__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px 20px !important; /* Vertical and horizontal gap */
}

/* 2. Product Image Styling (Even Smaller) */
.wc-block-cart-item__image {
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px !important;
}

/* 3. Typography Hierarchy */
.wc-block-components-product-name {
    flex: 0 0 100% !important; /* Force to its own line */
    font-size: 0.95rem !important; /* Compact font */
    font-weight: 700 !important;
    margin-bottom: 2px !important;
}

.wc-block-cart-item__metadata {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.75rem !important;
    color: #666 !important; /* Subtle gray for metadata */
    margin: 0 !important;
    width: auto !important;
    max-width: max-content !important;
}

.wc-block-components-product-metadata {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    width: auto !important;
}

/* 4. Price & Discount Badge Styling */
.wc-block-components-product-price {
    flex: 0 0 100% !important; /* Force to its own line */
    gap: 8px !important;
    margin: 4px 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* HIGH-SPECIFICITY OVERRIDE FOR SAVE BADGE */
#main .wc-block-cart .wc-block-cart-item .wc-block-components-product-price .wc-block-components-product-price__discount,
.wc-block-cart-item .wc-block-components-product-price__discount,
.wc-block-cart-item [class*="discount"] {
    background: #2D5A27 !important; /* Force Brand Green */
    color: #ffffff !important;      /* Force White Text */
    padding: 3px 10px !important;
    border-radius: 50px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 2px 6px rgba(45, 90, 39, 0.2) !important;
    border: none !important;
    text-decoration: none !important;
    height: auto !important;
    line-height: 1 !important;
}

/* 4.1 Weight Metadata, Quantity, and Remove Alignment */
.wc-block-cart-item__metadata,
.wc-block-cart-item__quantity {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    margin: 0 !important;
    width: auto !important;
    max-width: max-content !important;
}

/* Remove default margins that break alignment */
.wc-block-components-quantity-selector,
.wc-block-cart-item__remove-link {
    margin: 0 !important;
}

/* 5. Quantity Selector Customization (Modern Pill Design) */
.wc-block-components-quantity-selector {
    background: #f0f2f0 !important;
    border-radius: 50px !important;
    padding: 0 4px !important;
    height: 36px !important; /* Improved height for better touch/alignment */
    display: flex !important;
    align-items: center !important;
    border: 1px solid #e0e0e0 !important;
    width: auto !important;
    max-width: fit-content;
}

.wc-block-components-quantity-selector button,
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
    background: transparent !important;
    border: none !important;
    height: 30px !important;
    width: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #333 !important;
}

.wc-block-components-quantity-selector button:hover {
    background: rgba(0,0,0,0.05) !important;
}

.wc-block-components-quantity-selector input,
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 35px !important;
    font-weight: 700 !important;
    color: #000 !important;
    appearance: none !important;
    -moz-appearance: textfield !important;
}

/* Hide spin buttons */
.wc-block-components-quantity-selector input::-webkit-outer-spin-button,
.wc-block-components-quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 6. Item Total Price (Compact) */
.wc-block-cart-item__total {
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    color: #111 !important;
    text-align: right !important;
}

/* 7. Remove Link Enhancement */
.wc-block-cart-item__remove-link {
    font-size: 0.65rem !important;
    opacity: 0.6;
}

.wc-block-cart-item__remove-link:hover {
    opacity: 1;
    color: #e74c3c !important;
}

/* Mobile Responsiveness for Cards */
@media screen and (max-width: 768px) {
    .wc-block-cart-item {
        grid-template-columns: 70px 1fr !important;
        gap: 12px !important;
        padding: 10px !important;
    }
    .wc-block-cart-item__image { width: 70px !important; height: 70px !important; }
}