/* Single Product Page Styling */

/* Endast single product sidor får #F4F4F4 bakgrund */
body.single-product {
    background: #F4F4F4 !important;
}

.custom-single-product {
    background: #F4F4F4;
    padding: 20px 0;
}

.custom-single-product .wrapper {
    max-width: var(--content-max-width, 1400px);
    margin: 0 auto;
    padding: 0 20px;
}

.single-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0px 30px 30px 30px;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* Produktbilder sektion */
.product-images-section {
    display: flex;
    gap: 20px;
}

.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80px;
}

.thumbnail-item {
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-sizing: border-box;
}

.thumbnail-item.active,
.thumbnail-item:hover {
    border-color: var(--accentColor);
}

.thumbnail-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-main-image {
    flex: 1;
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-navigation {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.nav-arrow {
    background: rgba(255,255,255,0.95);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0,0,0,0.15);
    color: #333;
}

.nav-arrow:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.main-image-container {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Produktinformation sektion */
.product-info-section {
    padding: 20px 0;
}

.product-favorite {
    text-align: right;
    margin-bottom: 15px;
}

.favorite-icon {
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ccc;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.favorite-icon:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

.product-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-sku {
    color: #888;
    margin-bottom: 15px;
    font-size: 13px;
}

.sku-label {
    font-weight: normal;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 20px;
}

.product-attributes {
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.attribute-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
}
.smort-logo img {
    height: 45px;
    object-fit: contain;
}

.attribute-row:last-child {
    border-bottom: none;
}

.attribute-label {
    font-weight: 500;
    color: #555;
    width: 40%;
}

.attribute-value {
    color: #333;
    text-align: right;
    width: 60%;
}

.product-description {
    color: #000;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 13px;
}

.woocommerce div.product form.cart{
    margin-bottom: 0px;
}
.stock-status {
    margin-bottom: 20px;
}

.single-product .in-stock:before {
    content: "";
    width: 15px;
    height: 15px;
    background-color: #66e741;
    display: inline-flex;
    margin-right: 10px;
    border-radius: 560%;
    align-items: center;
}
span.in-stock {
    font-size: 12px;
    align-items: center;
    display: flex;
    color:#000;
}
.out-of-stock {
    color: #f44336;
    font-weight: 500;
    font-size: 13px;
}

.out-of-stock::before {
    content: "●";
    margin-right: 5px;
}

/* Add to cart sektion */
.add-to-cart-section {
    margin-bottom: 25px;
}

.quantity-cart-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    background: transparent;
    border-radius: 0;
    padding: 0;
    width: 100%;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 50px;
    overflow: hidden;
    padding: 8px;
}

.qty-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    font-weight: 300;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.qty-btn:hover {
    background: rgba(0,0,0,0.1);
}

.qty {
    border: none;
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    background: transparent;
    color: #333;
    margin: 0 10px;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.qty::-webkit-outer-spin-button,
.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.single-product .woocommerce-message {
    max-width: 700px;
    margin: 20px auto !important;
    border-radius: 30px !important;
}
.single_add_to_cart_button,
.woocommerce div.product form.cart .button {
    background: var(--accentColor) !important;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
    height: 48px;
    flex: 1;
    justify-content: center;
    margin-left: 0;
    text-transform: none;
}

.single_add_to_cart_button:hover,
.woocommerce div.product form.cart .button:hover {
    background: var(--accentColor);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.cart-icon {
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url('/wp-content/plugins/smort-cart/img/bag-outline.svg');
    background-size: 14px 14px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Produktinformation ikoner */
.product-info-icons {
    display: flex;
    gap: 40px;
    margin: 25px 0;
    padding: 0;
    border: none;
    justify-content: center;
    align-items: center;
}

.info-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.info-icon:hover {
    color: var(--accentColor);
}

.info-icon span:first-child {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    margin: 0;
    color: var(--accentColor2);
    font-weight: bold;
}

/* Accordion */
.product-accordions {
    margin-top: 20px;
}

.accordion-item {
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid;
}

.accordion-arrow {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item.active .accordion-content {
    padding: 20px;
    max-height: 500px;
}

.technical-specs {
    width: 100%;
    border-collapse: collapse;
}

.technical-specs td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.technical-specs td:first-child {
    font-weight: 600;
    width: 40%;
}
.woocommerce ul.products li.product a, .woocommerce ul.products li.custom-product-card a{
    color:#fff !important;
}
.contract-customer-shop-notice {
    max-width: var(--content-max-width, 1400px);
    margin: 20px auto;
}
.woocommerce ul.products li.custom-product-card .product-title a{
    height: 40px;
}

/* ========================================
   CONTRACT CUSTOMER STYLES FOR SINGLE PRODUCT
   ======================================== */

/* Pris sektion för icke-inloggade - meddelande + knapp */
.product-price-contract-required {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Meddelande text */
.price-notice-text {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid #dee2e6;
}

/* Logga in knapp */
.price-contract-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, var(--accentColor2, #e4002b) 0%, #c41e3a 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
    width: auto;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(228, 0, 43, 0.2);
    align-self: flex-start;
}

.price-contract-btn:hover {
    background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(228, 0, 43, 0.3);
    text-decoration: none;
}

.price-contract-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Bli avtalskund knapp för icke-inloggade på single product */
.become-contract-customer-single {
    width: 100%;
}

.become-contract-customer-btn {
    background: var(--accentColor2, #e4002b) !important;
    color: white !important;
    border: none !important;
    width: 100% !important;
    justify-content: center !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.become-contract-customer-btn:hover {
    background: #c41e3a !important;
    color: white !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

/* USP ikoner med svart text */
.product-info-icons {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.info-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000 !important; /* Svart text */
}

.info-icon span:first-child {
    color: #28a745 !important; /* Grön checkmark */
    font-weight: bold;
    font-size: 16px;
}

.info-icon span:last-child {
    color: #000 !important; /* Svart text för USP-texten */
    font-weight: 500;
}

/* Responsiv design för USP och pris-knapp */
@media (max-width: 768px) {
    .product-info-icons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
        margin-top: 20px;
    }

    .info-icon {
        font-size: 10px;
        min-width: 0;
        white-space: nowrap;
    }

    .info-icon:nth-child(3) {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .info-icon span:last-child {
        line-height: 1.15;
        white-space: nowrap;
    }

    .product-price-contract-required {
        gap: 10px;
    }

    .price-notice-text {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    .price-contract-btn {
        font-size: 0.9rem;
        padding: 10px 16px;
        max-width: 160px;
        align-self: center;
    }

    .price-contract-btn svg {
        width: 14px;
        height: 14px;
    }
}
/* Relaterade produkter */
.custom-related-products {
    background: efeff0;
    padding: 40px 0;
    margin-top: 0;
}

.custom-related-products .wrapper {
    max-width: var(--content-max-width, 1400px);
    margin: 0 auto;
    padding: 0 20px;
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid;
    padding-bottom: 15px;
}

.related-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #34495e;
    text-decoration: none;
}

.view-all-link .arrow {
    font-size: 16px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.related-product-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.related-product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 20px;
}

.related-product-image img {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.related-product-item:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    height: auto;
    min-height: 40px;
}

.related-product-title a {
    color: #333 !important;
    text-decoration: none !important;
}

.related-product-title a:hover {
    color: #333 !important;
}

.related-product-meta {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.related-product-price {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--accentColor2) !important;
    font-family: 'montserrat';
}

.related-stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    color: #48bb78;
}

.related-stock-status .in-stock::before,
.related-stock-status .out-of-stock::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
    display: inline-block;
    margin-right: 5px;
}

.related-stock-status .out-of-stock::before {
    background: #e53e3e;
}

.related-product-actions {
    margin-top: auto;
}

.related-product-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: background 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-decoration: none !important;
    min-height: 35px !important;
}

.related-product-btn:hover {
    background: #c53030 !important;
    color: white !important;
    text-decoration: none !important;
}

.related-product-btn svg {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    padding: 4px !important;
    width: 24px !important;
    height: 24px !important;
}

/* Responsiv design */
@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .single-product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }

    .product-images-section {
        flex-direction: column;
    }

    .product-thumbnails {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .main-image-container {
        height: 300px;
    }

    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .custom-single-product {
        padding: 10px 0;
    }

    .custom-single-product .wrapper,
    .custom-related-products .wrapper {
        padding: 0 12px;
    }

    .single-product-layout {
        padding: 14px;
        gap: 18px;
    }

    .product-title {
        font-size: clamp(1.2rem, 4.8vw, 1.45rem);
        line-height: 1.18;
        margin-bottom: 6px;
    }

    .product-sku,
    .product-price,
    .product-attributes,
    .product-description,
    .stock-status,
    .add-to-cart-section {
        margin-bottom: 12px;
    }

    .product-attributes {
        padding: 10px;
    }

    .product-description {
        line-height: 1.55;
        font-size: 12px;
    }

    .product-main-image {
        padding: 12px;
        border-radius: 16px;
    }

    .main-image-container {
        height: 240px;
    }

    .product-thumbnails {
        gap: 6px;
    }

    .thumbnail-item {
        width: 54px;
        height: 54px;
        border-radius: 10px;
        padding: 4px;
    }

    .qty-btn {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .qty {
        width: 48px;
        height: 34px;
        font-size: 16px;
        margin: 0 6px;
    }

    .quantity-cart-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .single_add_to_cart_button {
        justify-content: center;
        width: 100%;
        height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .product-info-icons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin: 16px 0 12px;
    }

    .info-icon {
        font-size: 12px;
        gap: 6px;
    }

    .accordion-header {
        padding: 12px 0;
    }

    .accordion-content {
        padding: 0 0;
    }

    .accordion-item.active .accordion-content {
        padding: 12px 0;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .related-header h2 {
        font-size: 1.3rem;
    }

    .related-header {
        margin-bottom: 18px;
        padding-bottom: 10px;
    }

    .related-product-image {
        height: 130px;
        padding: 10px;
    }

    .related-product-info {
        padding: 12px;
    }

    .related-product-title {
        min-height: 0;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .related-product-meta {
        margin-bottom: 12px;
        gap: 6px;
    }

    .related-product-price {
        font-size: 14px !important;
    }

    .related-stock-status {
        font-size: 12px;
        gap: 6px;
    }

    .related-product-btn {
        min-height: 32px !important;
        padding: 7px 12px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    .custom-single-product .wrapper,
    .custom-related-products .wrapper {
        padding: 0 10px;
    }

    .single-product-layout {
        padding: 12px;
        gap: 14px;
    }

    .product-main-image {
        padding: 10px;
    }

    .main-image-container {
        height: 200px;
    }

    .product-title {
        font-size: clamp(1.1rem, 5.8vw, 1.3rem);
    }

    .related-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-attributes {
        padding: 12px;
    }

    .attribute-row {
        flex-direction: column;
        gap: 3px;
        padding: 8px 0;
    }

    .attribute-label,
    .attribute-value {
        width: 100%;
        text-align: left;
    }

    .price-notice-text {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .price-contract-btn {
        max-width: 100%;
        width: 100%;
        justify-content: center;
    }

    .related-product-image {
        height: 110px;
        padding: 8px;
    }

    .related-product-info {
        padding: 10px;
    }

    .related-product-title {
        font-size: 12px;
        line-height: 1.25;
    }

    .related-product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .related-product-btn {
        padding: 6px 10px !important;
        min-height: 30px !important;
        font-size: 10px !important;
    }
}
