/* 
Theme Name: Promotion AB(Test) x Smort Commerce
Theme URI: http://example.com/smort
Author: Smort AB
Author URI: http://example.com
Description: Promotion AB (Test) Tema
Version: 1.0
License: GNU General Public License v2 eller senare
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smort
*/

:root {
    --accentColor: #162a49;
    --accentColor2: #E4002B;
    --content-max-width: 1400px;
    --black: #212121;
    --white: #ffffff; 
    --accentcolor: #FEFFF8; /* Default accent color */
    --accentcolor2: #707070;
    --accentcolor3: #F4F4F4;
    --fontFamily: 'Montserrat, sans-serif'; /* Default font family */
    
    --border-radius: 100px; /* Default border radius */
    --border-radius-sm: 0.4rem; /* Default border radius */
    --border-radius-md: 4rem; /* Default border radius */
    --delay: 0.25s;
}


* {
    box-sizing:border-box;
    interpolate-size: allow-keywords;
}



h1.h2.h3.h4.h5.h6 {
    font-weight: 400 !important;
}

.wooj-icon-basket-1:before {
    content: url(/wp-content/themes/smort_commerce/assets/smort-shopping-icon.svg) !important;
    filter: invert(0); 
}
/* Mobile Menu Styles */
.mobile-menu-container {
    display: none; /* Hidden by default */
    background-color: #333;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
}

.mobile-menu-container.active {
    transform: translateX(0);
}

.wrapper {
    width: 100%;
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding-inline: 32px;
}

@media (max-width: 1024px) {
    .wrapper {
        padding-inline: 24px;
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding-inline: 16px;
    }
}

.burger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1001;
    cursor: pointer;
}

.burger-icon {
    font-size: 30px;
    color: #fff;
}

.mobile-nav {
    margin-top: 50px;
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-menu li {
    margin: 15px 0;
}

.mobile-menu li a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .desktop-menu {
        display: none; /* Assuming your desktop menu has a class 'desktop-menu' */
    }
    .mobile-menu-container {
        display: block;
    }
}


.wc-j-upsellator-cart-count-container{
    padding: 0px 5px !important;
}

/* Överskugga XforWooCommerce styling för produktkort */
.woocommerce ul.products li.product .add-to-cart-btn,
.woocommerce-page ul.products li.product .add-to-cart-btn {
    width: 100% !important;
    background: var(--accentColor2) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-width: auto !important;
    white-space: normal !important;
}

.woocommerce ul.products li.product .add-to-cart-btn:hover,
.woocommerce-page ul.products li.product .add-to-cart-btn:hover {
    background: #c53030 !important;
}

/* XforWooCommerce AJAX produkter - Matcha din anpassade struktur */
.woocommerce ul.products li.custom-product-card .product-card-inner {
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 0 !important;
}

.woocommerce ul.products li.custom-product-card:hover .product-card-inner {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Produktbild styling för din anpassade struktur */
.woocommerce ul.products li.custom-product-card .product-image-container {
    background: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 200px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 15px !important;
    width: 100% !important;
}

.woocommerce ul.products li.custom-product-card .product-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    position: relative !important;
}

/* Extra säkerhet för alla produktbilder */
.woocommerce ul.products li.custom-product-card img,
.woocommerce ul.products li.custom-product-card .product-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
}

/* Tvinga alla bilder att stanna inom sina containers */
.woocommerce ul.products li.custom-product-card .product-image-container img {
    max-width: 100% !important;
    height: 150px !important;
    width: auto !important;
    object-fit: contain !important;
    position: static !important;
    transform: none !important;
}

/* Överskugga alla andra bildregler */
.woocommerce ul.products li img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Produktinfo styling för din anpassade struktur */
.woocommerce ul.products li.custom-product-card .product-info {
    padding: 0 15px 15px 15px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.woocommerce ul.products li.custom-product-card .product-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 0 15px 0 !important;
    line-height: 1.3 !important;
    color: #333 !important;
    font-family: 'CustomHeadingFont' !important;
}

.woocommerce ul.products li.custom-product-card .product-title a {
    color: #333 !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.custom-product-card .product-title a:hover {
    color: #333 !important;
}



.woocommerce ul.products li.custom-product-card .product-meta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
    flex-wrap: wrap !important;
}

.woocommerce ul.products li.custom-product-card .product-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--accentColor2) !important;
    font-family: 'Montserrat', sans-serif !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.woocommerce ul.products li.custom-product-card .product-stock {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #666 !important;
    font-family: 'Montserrat', sans-serif !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.woocommerce ul.products li.custom-product-card .stock-indicator {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #4CAF50 !important;
}

/* Knapp styling för din anpassade struktur */
.woocommerce ul.products li.custom-product-card .add-to-cart-btn {
    width: 100% !important;
    background: var(--accentColor2) !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 15px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: auto !important;
    min-height: 35px !important;
}

.woocommerce ul.products li.custom-product-card .add-to-cart-btn:hover {
    background: #c41e3a !important;
    transform: translateY(-2px) !important;
}

.woocommerce ul.products li.custom-product-card .add-to-cart-btn svg {
    width: 16px !important;
    height: 16px !important;
    stroke: white !important;
}

/* Säkerställ att custom-product-card följer grid-layouten */
.woocommerce ul.products li.custom-product-card {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Grid layout för både standard och XforWooCommerce produkter */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 10px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
    justify-content: center !important;
}

/* Säkerställ att alla produkttyper följer grid-layouten */
.woocommerce ul.products li.product,
.woocommerce ul.products li.custom-product-card {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Responsiv design för XforWooCommerce */
@media (max-width: 1200px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Produktlänkar styling för alla produkttyper */
.woocommerce ul.products li.product a,
.woocommerce ul.products li.custom-product-card a {
    text-decoration: none !important;
    color: inherit !important;
}

.woocommerce ul.products li.product a:hover,
.woocommerce ul.products li.custom-product-card a:hover {
    color: inherit !important;
}

/* Modal job */ 

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #000000;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 900px;
    text-align: center;
    position: relative;
}

.close-modal {
    color: #000;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.modal h2 {
    font-family: var(--fontFamily);
    color: var(--accentColor3);
    margin-bottom: 20px;
    font-size: 3rem;
}

.form-field label {
    color: #fff;
    font-family: 'CustomHeadingFont';
} 

.promotion-global-btn {
    background-color: var(--accentColor2);
    border: 1px solid var(--accentColor2);
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    padding:4px;
    padding-left: 12px;
    color: var(--white);
    display: flex;
    gap: 2rem;
    align-items: center;
    text-wrap: nowrap;
    max-width: min-content;
    text-decoration: none;
    cursor:pointer;
    div {
        background-color: var(--white);
        padding: 0.5rem 0.5rem 6px 0.5rem;
        border-radius: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        
        &::after {
            content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-arrow-right'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
            display: inline-block;
            vertical-align: middle;
        }
    }

    &.size-large {
      padding:8px;
      padding-left: 16px;
            gap: 3rem;
    }

    &.variant-primary {
        background-color: var(--accentColor);
        border-color: var(--accentColor);
    }
    
    &.variant-accent {
        background-color: var(--white);
        border-color: var(--accentcolor2);
        color: var(--black);

        div {
            background-color: var(--accentColor);
            &::after {
                content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-arrow-right'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
                display: inline-block;
                vertical-align: middle;
            }
            
        }
    }

    &:hover {
        filter: brightness(1.15);
    }
    &.customer-service {
        div {
            padding: 0.5rem 0.5rem 8px 0.5rem;
            &::after {
                content:'';
            }
        }
    }
} 

.stock-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.stock-green .stock-dot {
    background-color: green;
}

.stock-yellow .stock-dot {
    background-color: yellow;
}

.stock-red .stock-dot {
    background-color: red;
}

.woocommerce-breadcrumb {
    background-color: var(--accentColor);
    color: var(--white) !important;
    padding-block: 0.5rem !important;
    a, span {
        color: var(--accentcolor2) !important;
        text-decoration: none;
    }
}



/* Footer */ 

.footer-link-row a {
    text-transform: uppercase;
    font-size: 18px;
    margin: 0px !important;
}


.footer-link-row a {
  position: relative;
  text-decoration: none;
  color: inherit; /* Behåller textfärgen */
  padding-bottom: 5px; /* Avstånd för understrykningen */
  font-size: 20px;
  margin: 0px;
}
.footer-link-row h3 {
  margin: 0px 0px 12px 0px;
}
.footer-link-row a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px; /* Tjockleken på linjen */
  background-color: currentColor; /* Använder textens färg */
  transition: width 0.3s ease-in-out;
}

.footer-link-row a:hover::after {
  width: 100%; /* Expanderar linjen vid hover */
}

.footer-socials-paragraph {
    font-weight: 800;
    font-family: 'CustomHeadingFont';
}

/* Main btn gutenberg buttons */ 

.main-btn-promotion a {
    background-color: var(--accentColor2);
    text-align: left;
    color: #fff;
    text-decoration: none;
    width: 200px;
    padding: 15px 10px;
    border-radius: 30px;
    position: relative;
    font-size: 12px;
}
.smort-footer .main-btn-promotion a{
    width: 200px !important;
}

/* Header account button font styling */
a.header-account-btn {
    font-family: 'CustomContentFont' !important;
}

/* Mobile safety layer: prevent horizontal overflow and oversized heading spillover */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    #page,
    .site,
    .site-main,
    main {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    h1,
    h2,
    h3,
    .custom-category-header .category-title,
    .smort-product-slider-title-container h2,
    .smort-product-areas-title-container.wrapper h2 {
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }

    .custom-category-header .category-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem) !important;
        line-height: 1.14;
    }

    .smort-product-slider-title-container h2,
    .smort-product-areas-title-container.wrapper h2 {
        font-size: clamp(1.6rem, 7vw, 2rem) !important;
        line-height: 1.14;
    }

    .smort-product-slider-title-container,
    .smort-product-areas-title-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .smort-product-slider-title-container .promotion-global-btn,
    .smort-product-areas-title-container .promotion-global-btn,
    .custom-category-header .promotion-global-btn {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .custom-category-header .category-title {
        font-size: clamp(1.55rem, 8.2vw, 1.9rem) !important;
    }

    .smort-product-slider-title-container h2,
    .smort-product-areas-title-container.wrapper h2 {
        font-size: clamp(1.35rem, 7vw, 1.65rem) !important;
    }
}

/* Dölj header account button i mobil */
@media (max-width: 768px) {
    a.header-account-btn {
        display: none !important;
    }
}
.main-btn-promotion a:after {
    content: url(/wp-content/themes/smort_commerce_child/img/arrow-right-black.svg);
    position: absolute;
    right: 7px;
    background-color: #fff;
    width: 25px;
    text-align: center;
    border-radius: 30px;
    height: 25px;
    top: 8px;
    align-items: center;
    display: flex;
    justify-content: center;
}

.woocommerce .woocommerce-breadcrumb{
    margin: 0px;
}
.archive main#main {
    background-color: #f8f9fa;
}

/* Megameny */ 

.header-megamenu-heading {
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--accentColor2);
    padding-bottom: 10px;
}
nav.woocommerce-breadcrumb a {
    color: #ffffff !important;
}
.woocommerce .woocommerce-breadcrumb {
    margin: 0px;
    color: #e1e1e1 !important;
}

.smort-cart-icon .cart-icon{
    background-image: none !important; 
}