/* WC Breadcrumbs */
.custom-breadcrumbs {
    max-width: 1440px;
    margin: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 141px 24px 32px;
    position: relative;
    transition: padding 0.4s ease, gap 0.4s ease, margin-bottom 0.4s ease;
}
.breadcrumb-separator img {
    height: 14px;
    width: 14px;
} 
.breadcrumb-link {
    color: var(--black1);
    transition: color 0.4s ease;
}
.breadcrumb-link:hover {
    color: var(--grey1);
}
.breadcrumb-current {
    color: var(--grey1);
}
/* Main content */
.single-product-upper-part {
    display: grid;
    grid-template-columns: 2fr 1.02fr;
    gap: 24px;
    padding-bottom: 80px;
    transition: gap 0.4s ease, padding-bottom 0.4s ease;
}
/* left side */
.single-product-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 12px;
}

.single-product-gallery > div {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;

    display: flex;          
    align-items: center;
    justify-content: center;
}
.single-product-gallery > div > div {
    height: 100%;
    width: 100%;
}

.single-product-gallery video,
.single-product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* right side */
.single-product-summary {
    height: max-content;
}
.single-product-summary .h3 {
    margin-bottom: 16px;
}
.single-product-summary .product_meta {
    margin-bottom: 16px;
}
.single-product-summary .custom-rating {
    margin-bottom: 32px;
}
.product_meta .posted_in {
    display: none;
}
/* price container */
.single-product-summary .save-percentage {
    background: var(--brand1);
    padding: 2px 6px;
    border-radius: 4px;
    width: max-content;
    margin-bottom: 12px;
}
.single-product-summary .price {
    display: flex;
    flex-direction: row-reverse;
    justify-content: start;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.single-product-summary .price * {
    font-weight: 600;
    font-size: 24px;
    line-height: 31px;
}
.single-product-summary .price del *  {
    color: var(--grey1);
    font-size: 20px;
    font-weight: 400;
    line-height: 26px; 
}
/* descriptions */
.product-short-description,
.product-short-description > div {
    color: var(--grey1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: gap 0.4s ease;
}
.product-short-description {
    margin-bottom: 32px;
}

.product-short-description h1,
.product-short-description h2,
.product-short-description h3,
.product-short-description h4,
.product-short-description h5,
.product-short-description h6 {
    color: var(--black1);
    font-size: 20px;
    font-weight: 400;
    line-height: 26px;
}
/* form */
/* variable product */
.single-product-summary .variable-product-cart {
    padding-bottom: 32px;
    display: flex;
    flex-direction: column;
}
.single-product-summary .variation-product-table {
    order: 1;
    margin-top: -8px;
    margin-bottom: 24px;
    transition: margin-top 0.4s ease, margin-bottom 0.4s ease;
}
.single-product-summary .variation-product-table tbody {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.single-product-summary .variation-product-table tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: gap 0.4s ease;
}
.single-product-summary .variation-product-table label {
    display: block;
    width: max-content;
}
.single-product-summary .variation-product-table select {
    display: none;
}
.single-product-summary .variation-product-table .variation-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.single-product-summary .variation-product-table .variation-button {
    background: transparent;
    border: none;
    padding: 9px 16px;
    border: 1px solid var(--brand1);
    color: var(--black1);
    border-radius: 50px;
    transition: border-color 0.4s ease, background-color 0.4s ease, color 0.4s ease;
}
.single-product-summary .variation-product-table .variation-button:hover {
    border-color: var(--black1);
    cursor: pointer;
} 
.single-product-summary .variation-product-table .variation-button.selected {
    background: var(--black1);
    border-color: var(--black1);
    color: var(--white1);
}
.single-product-summary .single_variation {
    order: 2;
}
.single-product-summary .variable-product-cart .product-short-description {
    order: 3;
}
.single-product-summary .variations_button {
    display: flex;
    gap: 12px;
    padding-top: 32px;
    border-top: 1px solid var(--brand1);
    order: 4;
}
.single-product-summary .variations_button.woocommerce-variation-add-to-cart-disabled {
    pointer-events: none;
}
/* simple product */
.single-product-summary .simple-product-cart {
    border-top: 1px solid var(--brand1);
    padding: 32px 0;
    display: flex;
    gap: 12px;
    align-items: center;
}
.single-product-summary form .black-btn {
    width: 100%;
    min-width: max-content;
    padding: 12px 12px;
    flex: 1 1 100%;
}
.single-product-summary form .black-btn.disabled {
    pointer-events: none;
    background: var(--grey1);
    color: var(--black1);
}
/* inputs */
.quantity-wrapper {
    display: flex;
    border: 1px solid var(--black1);
    height: 45px;
    border-radius: 4px;
    overflow: hidden;
    color: var(--black1);
    min-width: 95px;
}
.quantity-wrapper .qty-minus,
.quantity-wrapper .qty-plus {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    flex: 0 0 28px;
    cursor: pointer;
    color: var(--black1);
}
.quantity-wrapper .qty-minus:disabled,
.quantity-wrapper .qty-plus:disabled {
    color: var(--grey1);
    cursor: unset;
    pointer-events: none;
}
.quantity-wrapper .qty-minus {
    padding: 15px 0 15px 14px;
}
.quantity-wrapper .qty-plus {
    padding: 12px 14px 12px 0;
}
.quantity-wrapper .quantity input::-webkit-outer-spin-button,
.quantity-wrapper .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity-wrapper .quantity {
    display: flex;
}
.quantity-wrapper .quantity input {
    width: 40px; 
    box-sizing: border-box;
    height: 45px;          
    text-align: center;
    overflow: hidden;      
    text-overflow: ellipsis; 
    white-space: nowrap;
    border: none;
}
.quantity-wrapper .quantity input:focus {
    outline: none;
}
/* errors */
.single-product-summary div[role="alert"]:not(.woocommerce-variation),
.single-product-summary p[role="alert"] {
    order: 2;
    font-family: "HalisR";
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--red1);
    margin-bottom: 24px;
}
.single-product-upper-part .woocommerce-notices-wrapper {
    grid-column: span 2;
}
.single-product-upper-part .woocommerce-notices-wrapper > div:not(:has(ul)) {
    color: var(--black1);
    background: var(--brand1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 24px;
    width: fit-content;
}

.single-product-upper-part .woocommerce-notices-wrapper ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.single-product-upper-part .woocommerce-notices-wrapper ul li {
    color: var(--black1);
    padding: 12px;
    background: var(--brand1);
    border-radius: 8px;
}
.single-product-upper-part .woocommerce-notices-wrapper .woocommerce-error:focus,
.single-product-upper-part .woocommerce-notices-wrapper .woocommerce-message:focus,
.single-product-upper-part .woocommerce-notices-wrapper .woocommerce-info:focus {
    border: none;
    outline: none;
}

/* Gallery */
.product-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left:0; top:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}
.product-modal .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    user-select: none;
}
.product-modal .modal-inner img,
.product-modal .modal-inner video {
    width:100%;
    height:auto;
    max-height: 80vh;
}
.modal-close, .modal-prev, .modal-next {
    position: absolute;
    color: var(--white1);
    cursor: pointer;
    user-select: none;
    transition: color 0.4s ease;
}
.modal-close:hover, .modal-prev:hover, .modal-next:hover {
    color: var(--grey1);
}
.modal-prev, .modal-next {
    background: none;
    border: unset;
}
.modal-close { 
    top:40px; 
    right:40px; 
    height: 35px;
    width: 35px;
}
.modal-close svg {
    height: 35px;
    width: 35px;
}
.modal-prev { 
    height: 35px;
    width: 35px;
    top:50%; 
    left:-40px; 
    transform: translateY(-50%); 
}
.modal-next { 
    height: 35px;
    width: 35px;
    top:50%; 
    right:-40px; 
    transform: translateY(-50%); 
}
.modal-prev svg,
.modal-next svg {
    height: 35px;
    width: 35px;
}
.modal-prev svg {
    transform: rotate(90deg);
}
.modal-next svg {
    transform: rotate(-90deg);
}

/* Extra headline */
.product-headlines {

    .headline-item {
        border-bottom: 1px solid var(--brand1);
        transition: padding 0.4s ease;
    }
    .headline-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 24px 0;
        user-select: none;
        cursor: pointer;
        transition: padding 0.4s ease;
    }
    .headline-title svg {
        height: 26px;
        width: 26px;
        transform: rotate(0deg);
        transition: transform 0.4s ease;
    }
    .headline-desc {
        max-height: 0;
        visibility: hidden;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        gap: 16px;
        transition: max-height 0.4s ease, margin-bottom 0.4s ease, visibility 0.4s ease;
    }
    .headline-item.active .headline-desc {
        visibility: visible;
        margin-bottom: 24px;
        display: flex;
    }
    .headline-item.active .headline-title svg {
        transform: rotate(180deg);
    }
}




/* Responsive */
@media(max-width: 768px) {
    /* WC Breadcrumbs */
    .custom-breadcrumbs {
        padding: 116px 16px 0;
        gap: 6px;
        margin-bottom: 24px;
    }
    /* Only when video exists */
    .custom-breadcrumbs:has(.product-video-content) {
        padding-bottom: 232px;
    }
    /* Main content */
    .single-product-upper-part {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-bottom: 50px;
    }
    /* left side */
    .single-product-gallery {
        order: 2;
    }
    /* Every third item span 2 columns */
    .single-product-gallery > div:nth-child(3n) {
        grid-column: span 2;
    }
    /* right side */
    .single-product-summary {
        order: 1;
    }
    .single-product-summary .price * {
        font-size: 22px;
        line-height: 29px;
    }
    .single-product-summary .price del * {
        font-size: 18px;
        line-height: 23px;
    }
    .product-short-description h1,
    .product-short-description h2,
    .product-short-description h3,
    .product-short-description h4,
    .product-short-description h5,
    .product-short-description h6 {
        font-size: 18px;
        line-height: 24px;
    }
    /* descriptions */
    .product-short-description {
        gap: 12px;
    }
    /* Form variable */
    .single-product-summary .variation-product-table {
        margin-top: -16px;
        margin-bottom: 16px;
    }
    .single-product-summary .variation-product-table tr {
        gap: 10px;
    }
    /* video */ 
    .product-video-content {
        position: absolute;    
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        z-index: -1;
    }
    /* gallery */
    .modal-close { 
        top:20px; 
        right:15px; 
    }
    .product-modal .modal-content {
        max-width: 80%;
    }
    /* errors */
    .single-product-summary div[role="alert"]:not(.woocommerce-variation),
    .single-product-summary p[role="alert"] {
        font-size: 14px;
        line-height: 19px;
        margin-bottom: 16px;
    }
    .single-product-upper-part .woocommerce-notices-wrapper {
        grid-column: span 1;
    }
}