/*
Theme Name: Kiosko Child
Author: Your
Template: kiosko

*/

:root {
    --tab-bck: #F9FAFB;
    --btn-bck: #1DB5BE;
    --btn-hover: #188f97;
    
    --text-color: #4B5563;
    --button-border-color: #E5E7EB;


    --dpi-good: #0c8512;
    --dpi-okay: #c85131;
    --dpi-poor: #d62214;

    --info-box-bck: #4e4e4e;

    --font-heading: 'Inter', serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Inder', sans-serif;
}

h1.wp-block-post-title,
h2.wp-block-post-title{
    font-family: var(--font-body);
    max-width: var(--wp--style--global--wide-size) !important;
    margin-top: 0.75rem !important;
    font-weight: 500;
    font-size: 1.4rem;
}

.custom-variations-container {
    margin-bottom: 2rem;
}

.custom-variations-container h5{
    display: block;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: normal;
    color: var(--text-color);
    font-family: var(--font-body);
}

.color-selector {
    margin-bottom: 1.5rem;
}

.color-selector-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.color-box, .stitch-color-box {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid #D1D5DB;
    cursor: pointer;
    border-radius: 8px;
    box-sizing: border-box;

    outline: 2px solid transparent;
    /* Small spacing between borders */
    /*outline-offset: 3px;*/

    position: relative;
    box-sizing: border-box;
}

.color-box:hover::before,
.stitch-color-box:hover::before {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--info-box-bck);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 20000;
    pointer-events: none;
}


/* White checkmark on selected color boxes using ::after */
.color-box.selected::after,
.stitch-color-box.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
    z-index: 3;
    pointer-events: none;
}


/* Selected + Hover State */
.color-box.selected:hover,
.stitch-color-box.selected:hover {
    
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.size-selector{
    margin-bottom: 1.5rem;
}

.size-selector-wrapper{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-box {
    padding: 4px 8px;
    border: 1px solid #D1D5DB;
    background-color: white;
    outline: 1px solid transparent;  /* Additional transparent border */
    cursor: pointer;
    color: #1F2937;
    font-size: 1rem;
    border-radius: 4px;
    box-sizing: border-box;
    min-width: 37px;
    text-align: center;
}
.selected {
    border-color: var(--btn-bck);
    outline-color: var(--btn-bck);  /* Make outline visible */
}

/*
.color-box .selected{
    outline-color: #000;
}
*/



.wp-block-woocommerce-product-price{
    display: none;
}

.wp-block-woocommerce-product-meta {
    display: none !important;
}





.before-description {
    clear: both; /* clearing the floating gallery and summary above */
    display: block;
    width: 100%;
    margin-top: 2em;
}



.product-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 0;
}

.product-specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.shop-whole-page {
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: var(--wp--style--global--wide-size);
}


.entry-content.wp-block-post-content-is-layout-constrained{
    margin-top: 0;
}

.page-breadcrumbs,
.woocommerce-breadcrumb {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: #666;
}
.page-breadcrumbs a,
.woocommerce-breadcrumb a {
    text-decoration: none;
    transition: color 0.2s ease;
    color: #666;
}
.page-breadcrumbs a:hover,
.woocommerce-breadcrumb a:hover {
    color: #333;
}
.page-breadcrumbs span {
    color: #999;
    font-weight: 300;
}

@media (min-width: 768px) {
    .product-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-specs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-spec-item {
    padding: 0.3rem;
}

.product-spec-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d1d5db;
}

.product-icon {
    height: 48px;
    width: 48px;
    object-fit: contain;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-link:hover {
    text-decoration: none;
}

.product-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-check {
    color: var(--text-color);
}

.product-material-item,
.product-feature-item {
    margin-bottom: 1rem;
}

.product-material-item:last-child,
.product-feature-item:last-child {
    margin-bottom: 0;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1,
h1.alignwide.wp-block-post-title {
    font-size: 1.3rem;
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--wp--preset--color--contrast);
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-color);
    line-height: 1.5;
}

.variant-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    padding-top: 20px;
  }
  
  .variant-info-boxes {
    display: flex;
    gap: 16px;
  }
  
  .variant-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    flex: 1;
  }
  
  .variant-price-label {
    color: #333;
    margin-bottom: 4px;
    font-weight: bold;
  }
  
  .variation-price {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
  }

  .variation-price small,
  .wc-block-components-totals-item__label small{
    color: #666;
  }

  th.wc-block-cart-items__header-total span small{
    text-transform: lowercase;
    color: #666;
  }
  
  .variant-shipping-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: bold;
  }
  
  .variant-flag {
    width: 24px;
    height: 16px;
  }
  
  .variant-days {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .variant-shipping-cost {
    color: #666;
  }
  
  .editor-button {
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 16px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
}

    .editor-button__disabled{
        background-color: #a8a8a8;
        pointer-events: none;
        cursor: default;
    }
  
  .variant-button:hover {
    background-color: #b91c1c;
  }




    
.smooth-scroll-link {
    display: inline-block;
    margin-left: 5px;
    color: #333;
    text-decoration: underline;
    cursor: pointer;
}

.smooth-scroll-link:hover {
    color: #000;
}


/* Fix the review link to be vertivally centered */
.woocommerce div.product div.summary .woocommerce-product-rating .woocommerce-review-link {
    top: -.3em !important; /* Override the negative top value */
}


/* Disable zoom effect on product images */
.woocommerce-product-gallery__wrapper .zoomImg {
    display: none !important;
}







/* Gallery navigation arrows */

.gallery-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-nav-button:hover {
    background: #f8f8f8;
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}




/* Force size of the product gallery thumbnails */
/* Thumbnail styles */
.flex-control-nav li img,
.flex-control-thumbs li img {
    width: 80px !important;
    height: auto !important;
    object-fit: cover;
    padding-bottom: 3px; /* Add padding for the border */
    border-bottom: 3px solid transparent; /* Default transparent border */
    transition: border-color 0.2s ease; /* Add smooth transition */
}

/* Adjust the container size if needed */
.flex-control-nav li,
.flex-control-thumbs li {
    width: 80px !important;

}


/* Active thumbnail style */
.flex-control-nav li img.flex-active,
.flex-control-thumbs li img.flex-active {
    border-bottom: 3px solid #000;
}

.flex-control-nav li img:hover,
.flex-control-thumbs li img:hover {
    border-bottom: 3px solid #979797;
    transition: border-color 0.2s ease;
}






/* Product gallery wrapper modifications = move gallery thumbnails to the left */
/* Product gallery wrapper modifications */
/* Product gallery wrapper modifications */
.woocommerce-product-gallery {
    display: flex !important;
    flex-direction: row;
    gap: 10px;
    position: relative;
}

/* Thumbnail navigation container */
.woocommerce div.product div.images .flex-control-thumbs {
    float: none;
    display: flex;
    flex-direction: column;
    width: 15%;
    order: -1;
    margin: 0;
    padding: 0;
}

/* Individual thumbnail styling */
.woocommerce div.product div.images .flex-control-thumbs li {
    width: 100%;
    float: none;
    margin: 0 0 10px 0;
    cursor: pointer;
    border: 2px solid transparent; /* Add transparent border by default */
}

/* Main image container */
.woocommerce-product-gallery .flex-viewport {
    width: 85%;
    margin-left: auto;
    /*height: auto !important;*/
    height: fit-content !important; /* to fit the height to image, so the nav buttons are always centered vertivally */
    position: relative;
    min-width: 0; /* Prevents flexbox overflow */
    max-width: 100%; /* Ensures it doesn't overflow its container */
}

/* Navigation buttons styling */
.gallery-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.gallery-nav-button:hover {
    background: rgba(255, 255, 255, 0.95);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

/* Ensure thumbnails maintain aspect ratio */
.woocommerce div.product div.images .flex-control-thumbs li img {
    width: 100%;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    display: block;
}

/* Active/hovered thumbnail state */
.woocommerce div.product div.images .flex-control-thumbs li img.flex-active,
.woocommerce div.product div.images .flex-control-thumbs li img:hover {
    opacity: 1;
}

/* Main image wrapper - important for smooth transitions */
.woocommerce-product-gallery__wrapper {
    transition: transform 0.5s ease-in-out !important;
    min-width: 0; /* Prevents flexbox overflow */
}

/* Individual main images */
.woocommerce-product-gallery__image {
    width: 100%;
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
}











/* Adjust gallery and summary column widths */
.woocommerce-product-gallery {
    width: 52% !important;
    float: left;
    min-width: 0; /* Prevents flexbox overflow */
}

.woocommerce div.product div.summary {
    width: 45% !important;
    float: right;
}







/* Product tabs labels */
/* Tab Navigation Styles */

.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: none;
    display: flex;
    gap: 1rem;
}

.woocommerce-tabs ul.tabs::before {
    display: none;
}

.woocommerce-tabs ul.tabs li {
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0 1rem;
    position: relative;
    opacity: 1;
    float: none;
}

.woocommerce-tabs ul.tabs li a {
    padding: 0.5rem 0;
    font-family: var(--font-heading);
    color: #666;
    text-decoration: none;
    position: relative;
    display: inline-block;  /* Helps maintain consistent spacing */
}

/* Active Tab Indicator */
.woocommerce-tabs ul.tabs li {
    background: none !important;  /* Force remove any background */
    z-index: 2;
    border-bottom: 3px solid transparent;
}

.woocommerce-tabs ul.tabs li:hover {
    border-bottom: 3px solid #979797;
    transition: border-color 0.2s ease;
}

.woocommerce-tabs ul.tabs li.active {
    border-bottom: 3px solid #000;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #000;
}

.woocommerce-tabs ul.tabs li a {
    font-size: 16px;
    padding: 0.5rem 0;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

/* Tab Content Panel */
.woocommerce-Tabs-panel {
    padding: 1rem 0;
    margin: 0;
    border-top: 1px solid #e5e5e5;
}

.woocommerce-Tabs-panel--description,
.woocommerce-Tabs-panel--additional_information {
    margin-top: 0;
}

/* Remove default WooCommerce tab styles */
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after {
    display: none;
}

.woocommerce-tabs ul.tabs li:first-child {
    margin-left: 0;
    border-left: none;
}





.woocommerce-Tabs-panel ul {
    padding-left: 2rem;
    margin: 1rem 0;
}

.woocommerce-Tabs-panel ul li {
    margin-bottom: 0 0.5rem;
    list-style-type: disc;
}



/* Product size attribute selectbox */
.size-selector select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.size-selector select:focus {
    outline: none;
    border-color: #333;
}





/* Fix for wrongly squezed cart page */
.woocommerce-cart main{
    max-width: none !important;
}

/* Material section scale styling */
.material-property {
    margin-bottom: 1.5rem;
}

.material-property:last-child {
    margin-bottom: 0;
}

.material-scale {
    margin-top: 0.5rem;
}

.scale-bar {
    position: relative;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.scale-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #1f2937;
    border-radius: 4px;
    width: var(--scale-width, 50%); /* Uses the CSS variable or defaults to 50% */
}

/* Set the progress percentages */
/*
.material-property:first-child .scale-bar::before {
    width: 55%;
}

.material-property:last-child .scale-bar::before {
    width: 65%;
}
*/

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-color);
}

h1.product_title {
    padding-bottom: 1rem;
}

.product-spec-content p{
    font-size: 1rem;
    font-family: var(--font-body);
}

/* Add to your existing style.css file */

/* Stitch Color Selector Styles - Same as color selector */
.stitch-color-selector {
    margin-bottom: 1.5rem;
}

.stitch-color-selector-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/*
.stitch-color-box {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid #D1D5DB;
    cursor: pointer;
    border-radius: 50%;
    box-sizing: border-box;
    outline: 2px solid transparent;
    position: relative;
    box-sizing: border-box;
}
    */

/* Update the general .selected class to also apply to stitch-color */
.stitch-color-selector .selected {
    border-color: var(--btn-bck);
    outline-color: var(--btn-bck);
}



/* Styles for unavailable attribute options */

/* General unavailable state for attribute boxes */
.color-box.unavailable,
.stitch-color-box.unavailable,
.size-box.unavailable {
    position: relative;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
    pointer-events: none !important;
}

/* Unavailable overlay for color swatches */
.unavailable-overlay {
    
}

.unavailable-x {
    width: 100%;
    height: 100%;
    color: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}

/* Color boxes specific styling */
.color-box,
.stitch-color-box {
    position: relative;
    /*overflow: hidden;*/
}

/* Size boxes unavailable state */
.size-box.unavailable {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
}

/* Dropdown select unavailable options */
select option:disabled {
    color: #9ca3af !important;
    background-color: #f9fafb !important;
}

/* Hover states for available options */
.color-box:not(.unavailable):hover,
.stitch-color-box:not(.unavailable):hover {
    
    z-index: 1;
    position: relative;
}

.size-box:not(.unavailable):hover {
    background-color: #e5e7eb;
    transition: background-color 0.2s ease;
}

/* Selected state should override unavailable */
.color-box.selected,
.stitch-color-box.selected,
.size-box.selected {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.color-box.selected .unavailable-overlay,
.stitch-color-box.selected .unavailable-overlay {
    display: none !important;
}

/* Loading state for when attributes are being updated */
.attribute-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Accessibility improvements */
.unavailable-overlay[aria-hidden="true"] {
    display: none;
}

/* Focus states for keyboard navigation */
.color-box:not(.unavailable):focus,
.stitch-color-box:not(.unavailable):focus,
.size-box:not(.unavailable):focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom product rating styles to match review section */
.custom-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.custom-product-rating .stars {
    font-size: 20px;
    line-height: 1;
}

.custom-product-rating .star {
    color: #ddd;
    margin: 0 1px;
}

.custom-product-rating .star.full {
    color: #ffc107;
}

.custom-product-rating .star.half {
    background: linear-gradient(90deg, #ffc107 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.custom-product-rating .rating-text {
    color: #666;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    text-decoration: underline;
}

.custom-product-rating .rating-text:hover {
    color: #0073aa;
    text-decoration: underline;
}

.wc-block-mini-cart__badge {
    background-color: var(--btn-bck);
}

.wc-block-mini-cart__button .wc-block-mini-cart__icon,
.wp-block-woocommerce-customer-account a svg {
    width: 1.8rem;
    height: 1.8rem;
    display: block; 
}

/*
 * top menu moved to the left 
 */
.wp-block-group.alignwide.is-content-justification-space-between.is-layout-flex {
    /* 2. Change justification to start from the left instead of space-between. */
    justify-content: flex-start;
    
    /* 3. Add a gap between the items (Site Title, Nav, Icons). */
    gap: 2em; /* Adjust this value for your desired spacing */

    /* 4. Ensure all items are vertically centered. */
    align-items: center;
}

/*
 * 5. Target the group that contains the account/cart icons.
 */
.wp-block-group:has(.wp-block-woocommerce-customer-account) {
    /* 6. Push this specific group all the way to the right. */
    margin-left: auto;
}

h2.wp-block-site-title{
    padding-right: 2rem;
    font-family: var(--font-heading);
    text-transform: none;
}

/* Alternative: If you want them slightly lower but not completely at bottom */
.wp-block-navigation.is-horizontal {
    align-items: baseline; /* Aligns to text baseline */
    padding-top: 0.5rem; /* Adds some top padding to push down slightly */
}

/* Main logo in header */
div.wp-block-group{
    gap: .1rem !important;
}

:root :where(.wp-block-site-title a:where(:not(.wp-element-button)):hover) {
    text-decoration: none;
    color: black;
}

a.button.editor-button,
a.wc-block-mini-cart__footer-checkout,
button.wc-block-components-checkout-place-order-button,
a.wc-block-cart__submit-button {
    background-color: var(--btn-bck);
}

a.button.editor-button:hover,
a.wc-block-mini-cart__footer-checkout:hover,
button.wc-block-components-checkout-place-order-button:hover,
a.wc-block-cart__submit-button:hover {
    background-color: var(--btn-hover);
}

/* Info icon styles */
.info-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transform: translateY(-1px);
}

.info-icon svg {
    width: 100%;
    height: 100%;
    fill: #666;
    transition: fill 0.3s ease;
    vertical-align: top;
    opacity: 0.5;
}

.info-icon:hover svg {
    fill: var(--btn-hover);
}

/* Tooltip styles */
.info-tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.info-icon:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unavailable-overlay {
        background-color: rgba(255, 255, 255, 0.95);
    }
    
    .unavailable-x {
        color: #000000;
        stroke-width: 4;
    }
    
    .size-box.unavailable {
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .color-box:not(.unavailable):hover,
    .stitch-color-box:not(.unavailable):hover {
        transform: none;
        transition: none;
    }
    
    .size-box:not(.unavailable):hover {
        transition: none;
    }
    
    .attribute-loading {
        transition: none;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .unavailable-x {
        width: 50%;
        height: 50%;
        stroke-width: 2.5;
    }
    
    .color-box:not(.unavailable):hover,
    .stitch-color-box:not(.unavailable):hover {
        transform: scale(1.05);
    }
}

/* Print styles */
@media print {
    .unavailable-overlay {
        background-color: rgba(0, 0, 0, 0.1);
    }
    
    .unavailable-x {
        color: #000000;
    }
}


.color-selector-wrapper {
    transition: all 0.3s ease;
}

.color-box {
    transition: all 0.3s ease, transform 0.2s ease;
}

.stitch-color-selector-wrapper {
    transition: all 0.3s ease;
}

.stitch-color-box {
    transition: all 0.3s ease, transform 0.2s ease;
}