/*
Theme Name: sempre diritto
Theme URI:  https://sempre-diritto.de
Author:     sempre diritto
Author URI: https://sempre-diritto.de
Template:   Divi
Version:    1.0
License:    GNU General Public License v2 or later
*/

/* Dropdown-Menü für Sortierreihenfolge ausblenden */
.woocommerce-notices-wrapper, .woocommerce-result-count, .woocommerce-ordering {
    display: none !important;
}

.fancybox-container {
    z-index: 999999 !important; /* Stellt sicher, dass die Fancybox immer oben ist */
}

.fancybox-caption {
    color: #fff;
    font-size: 24px;
    padding: 10px;
    text-align: center;
    background: #000;
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* Allgemeiner Header-Container */
.custom-product-archive-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

/* Bild im Header */
.custom-product-archive-header__image {
    max-width: 125px !important;
    height: auto;
}

/* Titel im Header */
.custom-product-archive-header__title {
    font-weight: 600;
    font-size: 36px;
    color: #ad8878;
    margin: 0;
    text-align: left;
    flex: 1;
}

/* Produktauflistung */
.custom-product-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    width: 100%;
    margin-bottom: 40px;
}

/* Tabelle mit shared: true Feldern */
.custom_product_shared_details {
    border-collapse: collapse;
    margin: 5px 0px 10px 0px;
    width: 100%;
    table-layout: auto; /* Automatische Spaltenanpassung */
    font-size: 14px;
    line-height: 1.2;
}

/* Zeilen */
.custom_product_shared_details__row {
    vertical-align: top;
}

/* Zellen */
.custom_product_shared_details__cell {
	padding: 4px 10px 4px 0px !important;
}

/* Linke Spalte (Label) */
.custom_product_shared_details__label {
    white-space: nowrap; /* Kein Zeilenumbruch */
    text-align: left;
    width: 1%; /* Minimale Breite, automatisch angepasst */
}

/* Rechte Spalte (Wert) */
.custom_product_shared_details__value {
    text-align: left;
}

.custom-product-item__title {
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2em;
    color: #fff !important;
    background-color: #ad8878; /* Deine gewünschte Hintergrundfarbe */
    padding: 10px 20px;
    text-align: left;
    width: 100%;
    position: relative; /* Für die abgeschrägte Ecke notwendig */
    clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 18px, 100% 100%, 0% 100%);
}

.custom-product-item__content {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* Hauptbild */
.custom-product-item__image {
    flex: 0 0 300px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.custom-product-item__image img {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
}

/* Thumbnail-Galerie */
.custom-thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 10px;
    max-width: 300px;
    margin-top: 10px;
}

.custom-thumbnail-gallery__item {
    flex: 0 0 auto;
    width: 75px;
    height: 75px;
    overflow: hidden;
    cursor: pointer;
}

.custom-thumbnail-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.custom-thumbnail-gallery__item img:hover {
    transform: scale(1.1);
}

/* Produktinformationen */
.custom-product-item__details {
    flex: 1 1 auto;
    padding: 20px;
    text-align: left;
}

.custom-product-item__details p {
    font-size: 16px;
    color: #333;
    margin-bottom: 0px;
}

.custom-product-item__details table {
    width: 100%;
    border-collapse: collapse;
}

.custom-product-item__details table th,
.custom-product-item__details table td {
    padding: 6px;
    text-align: left;
}

.custom-product-item__details table th {
    border-bottom: 1px solid #ad8878;
    font-weight: bold;
}

.custom-product-table {
    display: table;
}

.custom-interactive-product-table {
    display: none;
}

body.single-product #sidebar {
    display: none; 
}
body.single-product #left-area {
	padding-right: 0 !important;
	width: 100% !important;
}
body.single-product #main-content .container:before {
	display: none;
}

/* Medienanpassungen für Mobilgeräte */
@media only screen and (max-width: 1080px) {
	.container {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
		padding-left: 20px;
		padding-right: 20px;
	}

	.fancybox-caption {
	    font-size: 16px;
	}

	.custom-product-archive-header__image {
	    max-width: 75px !important;
	}

	.custom-product-item {
		margin-bottom: 40px;
	}

	.custom-product-item__title {
	    font-weight: 600;
	    font-size: 20px;
	    line-height: 1.2em;
	    color: #fff !important;
	    background-color: #ad8878; /* Deine gewünschte Hintergrundfarbe */
	    padding: 10px 20px;
	    text-align: left;
	    width: 100%;
	    position: relative; /* Für die abgeschrägte Ecke notwendig */
	    clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 18px, 100% 100%, 0% 100%);
	}

	.custom-product-item__image {
        max-width: 100%;
        justify-content: center;
        padding-bottom: 20px;
    }

    .custom-product-item__content {
        flex-direction: column;
        padding: 0;
    }

    .custom-product-item__details {
    	padding: 0;
    }

    .custom-thumbnail-gallery {
        justify-content: center;
        flex-wrap: wrap;
    }

    .custom-thumbnail-gallery__item {
        width: 50px;
        height: 50px;
    }

    .custom-product-table {
        display: none;
    }

    /* Grundlegendes Styling */
	.custom-interactive-product-table {
	    display: flex;
	    flex-direction: column;
	    gap: 10px;
	    border: 1px solid #ddd;
	    padding: 10px;
	    border-radius: 5px;
	    background: #fff;
	}

	/* Tabs (links) */
	.custom-interactive-tabs {
	    display: flex;
	    flex-wrap: wrap;
	    gap: 10px;
	    justify-content: flex-start;
	}

	.tab-button {
	    padding: 10px 15px;
	    background: #f7f7f7;
	    border: 1px solid #ddd;
	    border-radius: 5px;
	    cursor: pointer;
	    font-size: 14px;
	    text-align: center;
	    min-width: 80px;
	    text-overflow: ellipsis;
	    overflow: hidden;
	    white-space: nowrap;
	}

	.tab-button.active {
	    background: #ad8878;
	    color: #fff;
	    border-color: #ad8878;
	}

	/* Inhalt der Tabs (rechts) */
	.custom-interactive-tab-content {
	    display: flex;
	    flex-direction: column;
	    border-top: 1px solid #ddd;
	    padding-top: 10px;
	}

	.tab-content {
	    display: none;
	    padding: 10px;
	    background: #fff;
	    border: 1px solid #ddd;
	    border-radius: 5px;
	}

	.tab-content.active {
	    display: block;
	}

	/* Liste der Produkteigenschaften */
	.tab-content ul {
	    list-style: none;
	    padding: 0 !important;
	    margin: 0 !important;
	}

	.tab-content li {
	    margin-bottom: 8px;
	}

	.tab-content li strong {
	    color: #333;
	    font-weight: bold;
	}
}