/**
 * DZAI WooCommerce Single Product Custom Styles
 * 
 * Custom styling for WooCommerce single product pages
 * Works with Kadence theme
 * 
 * @version 1.0.0
 */


/* layout*/
.woocommerce span.onsale{
    display: none !important;
}

#main .woocommerce-notices-wrapper {
    display: none !important;
}

.has-sidebar .content-container {
    display: block !important;
}

.has-sidebar .content-container aside{
    display: none !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
    display: none !important;
}

@media screen and (min-width: 1000px) {

    .woocommerce div.product div.images,
    .woocommerce #content div.product div.images,
    .woocommerce-page div.product div.images,
    .woocommerce-page #content div.product div.images {
        float: left;
        width: 38% !important;
    }

    .woocommerce div.product div.summary,
    .woocommerce #content div.product div.summary,
    .woocommerce-page div.product div.summary,
    .woocommerce-page #content div.product div.summary {
        float: right;
        width: 58% !important;
        clear: none;
    }

}
/* product image */

.woocommerce div.product div.images .flex-control-thumbs { 
    top: 40px !important;
    left: 60px !important;
}
.woocommerce .woocommerce-product-gallery__image {
    pointer-events: none !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img {
    border-radius: 16px !important;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    border-radius: 8px !important;
    opacity: 0 !important;
}
/* breadcrumb */
.kadence-breadcrumb-container *{
    text-decoration: none !important;
}
.kadence-breadcrumb-container {
    color: #9CA3AF;
}
.kadence-breadcrumb-container .kadence-bread-current{
    color: #111827;
}

/* active section */
.summary.entry-summary .single-product-category {
    display: none !important;
}

/* ========================================
   CATEGORY IMAGE
======================================== */
.dzai-category-image-wrapper {
    margin-bottom: 30px;
    text-align: center;
    width: fit-content;
    padding: 8px 25px 5px 10px;
    background-color: #EFEFEF;
    border-radius: 26px;
}

.dzai-category-image-wrapper a {
    display: flex;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
}


.dzai-category-image {
    display: block;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    width: 40px;
}

.dzai-category-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #020617;
    letter-spacing: 1px;
}

/* ========================================
   PRODUCT GALLERY
======================================== */
.dzai-custom-gallery {
    position: relative;
}

.dzai-custom-gallery .woocommerce-product-gallery__wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 0;
}

.dzai-custom-gallery .woocommerce-product-gallery__image {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.dzai-custom-gallery .woocommerce-product-gallery__image:hover {
    border-color: #2c3e50;
    transform: scale(1.05);
}

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

/* Hide first gallery thumbnail */
.dzai-custom-gallery .woocommerce-product-gallery__image:first-child {
    display: none;
}

/* ========================================
   PRICE FORMATTING
======================================== */
.dzai-price-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.dzai-sale-badge {
    /*background: #FFA632;
    color: #121828;*/
    padding: 5px 0px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
    background: transparent;
    color: #9ca3af;
}

.dzai-regular-price {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

del.dzai-regular-price {
    color: #9D9D9D;
    font-size: 24px;
    font-weight: 400;
}

ins.dzai-sale-price {
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    color: #020617;
}

/* ========================================
   BUY NOW BUTTON
======================================== */


/* ========================================
   CUSTOM META DATA / Brand Info
======================================== */
.dzai-brand-image-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dzai-brand-image {
    width: auto;
    height: 40px !important;
    object-fit: contain;
    flex-shrink: 0;
}

.dzai-brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dzai-brand-name {
    font-weight: bold;
    font-size: 16px;
    line-height: 1.4;
}

.dzai-brand-label {
    font-size: 12px;
    color: #9CA3AF;
    line-height: 1.4;
    font-weight: 300;
    font-family: 'Roboto', sans-serif;
}

.flex-control-nav.flex-control-thumbs {
    display: none !important;
}

.dzai-short-description-mobile {
    font-size: 14px;
}

/* Default: assume desktop first */
.custom-web-only-display {
	display: block;
}

.custom-mobile-only-display {
	display: none;
}

/* Mobile breakpoint (<= 767px) */
@media (max-width: 767px) {
	.custom-web-only-display {
		display: none !important;
	}
	.custom-mobile-only-display {
		display: block !important;
	}

    .woocommerce-product-details__short-description {
        display: none !important;
    }
}

/* ========================================
   QUANTITY SELECTOR
======================================== */
.quantity {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}

.quantity input.qty {
    border: none !important;
    padding: 10px 15px !important;
    width: 70px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    background: transparent !important;
    -moz-appearance: textfield;
    max-width: 100px;
}

.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity input.qty:focus {
    outline: none;
}

/* Quantity buttons styling (if theme adds them) */
.quantity.spinners-added {
    border: none !important;
    width: auto !important;
    min-width: 110px !important;
    position: static !important;
}
.quantity.spinners-added input[type="button"] {
    min-width: 38px !important;
    width: 38px !important;
    height: 38px !important;
    background: #EFEFEF !important;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    line-height: 40px;   /* same as height */
    height: 40px;
    padding: 0;
    color: transparent !important;      /* hide text */
    font-size: 0;            /* prevent layout shift */
    text-shadow: none;       /* just in case theme adds it */
}

.quantity.spinners-added input[type="button"].plus {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23020617'><path d='M11 5h2v14h-2zM5 11h14v2H5z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 25px 25px !important;       
}

.quantity.spinners-added input[type="button"].minus {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23020617'><path d='M5 11h14v2H5z'/></svg>") !important;

    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 25px 25px !important;
}


/* ========================================
   STOCK AVAILABILITY
======================================== */
.dzai-in-stock {
    color: #27ae60 !important;
    font-weight: 600 !important;
    padding: 8px 15px;
    background: #d5f4e6;
    border-radius: 5px;
    display: inline-block;
    margin: 10px 0;
}

.dzai-in-stock::before {
    content: "✓ ";
    font-weight: 700;
}

.dzai-out-of-stock {
    color: #e74c3c !important;
    font-weight: 600 !important;
    padding: 8px 15px;
    background: #fadbd8;
    border-radius: 5px;
    display: inline-block;
    margin: 10px 0;
}

.dzai-out-of-stock::before {
    content: "✗ ";
    font-weight: 700;
}

/* Enhanced availability when in stock */
.product.dzai-in-stock .cart {
    border: 2px solid #27ae60;
    padding: 20px;
    border-radius: 8px;
    background: #f8fff8;
}

/* ========================================
   PRODUCT DESCRIPTION
======================================== */
.dzai-product-description-section {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dzai-short-description,
.dzai-full-description {
    margin-bottom: 30px;
}

.dzai-short-description h3,
.dzai-full-description h3 {
    font-size: 24px;
    font-weight: 700;
    color: #020617;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #020617;
    display: inline-block;
}

.dzai-short-description-content,
.dzai-full-description-content {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.dzai-short-description-content {
    font-size: 18px;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #3498db;
    margin-top: 15px;
}

.dzai-full-description-content p {
    margin-bottom: 15px;
}

.dzai-full-description-content ul,
.dzai-full-description-content ol {
    margin: 15px 0 15px 0px;
	list-style: none;
}

.dzai-full-description-content li {
    margin-bottom: 8px;
	list-style: none;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 768px) {
    .dzai-custom-gallery .woocommerce-product-gallery__wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dzai-price-wrapper {
        flex-direction: row;
        gap: 5px;
        align-items: flex-start;
    }
    
    .dzai-buy-now-button {
        width: 100%;
        margin: 0px !important;
    }
    
    .dzai-product-description-section {
        padding: 20px;
    }
    
    .dzai-meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .dzai-custom-gallery .woocommerce-product-gallery__wrapper {
        grid-template-columns: 1fr;
    }
    
    .dzai-regular-price {
        font-size: 20px;
    }
    
    ins.dzai-sale-price {
        font-size: 24px;
    }
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dzai-product-description-section {
    animation: fadeInUp 0.5s ease;
}


/* ========================================
   ADDITIONAL ENHANCEMENTS
======================================== */

.summary.entry-summary form.cart {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px !important;
    justify-content: space-between;
}

.summary.entry-summary form.cart::before {
    display: none !important;
}
.summary.entry-summary form.cart::after {
    display: none !important;
}

@media (max-width: 768px) {

    /*.summary.entry-summary form.cart .quantity {
        flex: 0 0 100%;
    }*/
    
    /* Edit to aligh selector @change*/
    .summary.entry-summary form.cart .quantity {
        flex: 0 0 calc(50% - 7.5px);
        margin-right: calc(50% - 7.5px) !important;
    }
    .quantity input.qty {
        width: auto !important;
        max-width: none !important;
        min-width: 0;
        flex: 1 1 auto !important;;
    }

    .summary.entry-summary form.cart 
    .single_add_to_cart_button,
    .summary.entry-summary form.cart 
    .dzai-buy-now-button {
        flex: 0 0 calc(50% - 7.5px);
    }

}

.single_add_to_cart_button.button.alt {
    width: auto !important;
    height: auto !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 27 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 25.8a2.6 2.6 0 1 1 0-5.2 2.6 2.6 0 0 1 0 5.2zm13.3 0a2.6 2.6 0 1 1 0-5.2 2.6 2.6 0 0 1 0 5.2zM6.9 5.2l3.2 6.4h9.3l3.7-6.4H6.9zm-1.3-2.6h19.7c.5 0 .9.2 1.2.7.3.4.3.9 0 1.3l-4.7 8.3c-.2.4-.6.8-1 1-.4.2-.9.4-1.3.4H9.5l-1.5 2.6H24v2.6H8c-1 0-1.8-.4-2.3-1.3-.5-.8-.5-1.7 0-2.5l1.8-3.2L2.7 2.6H0V0h4.3l1.3 2.6z' fill='%23020617'/%3E%3C/svg%3E");
    background-repeat: no-repeat !important;
    background-position: 15px center !important;
    background-size: 25px 25px !important;
    background-color: #FFA632 !important;
    font-family: 'Inter', sans-serif !important; 
    font-size: 18px !important;
    color: #020617 !important;
    border-radius: 26px !important;
    border: none !important;
    line-height: 1.4 !important;
    padding: 10px 20px 10px 50px !important;
}

.dzai-buy-now-button {
    width: auto !important;
    background-color: #FFA632 !important;
    font-family: 'Inter', sans-serif !important; 
    font-size: 18px !important;
    color: #020617 !important;
    border-radius: 26px !important;
    border: none !important;
    line-height: 1.4 !important;
    padding: 10px 20px 10px 20px !important;
}



/* Product title enhancement */
.product_title.entry-title {
    font-size: 34px;
    font-weight: 500;
    color: #020617;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -2px;
}

/* SKU styling */
.product_meta .sku_wrapper {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
    margin: 5px 0;
}

.product_meta .sku {
    font-weight: 600;
    color: #3498db;
}


/* meta digital key or subscription */
/* ========================================
   DIGITAL PRODUCT TYPE BADGE (AFTER TITLE)
======================================== */
.dzai-digital-product-type {
    margin: 15px 0px 15px 0px;
}

.dzai-product-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0px;
    font-weight: 700;
    color: #020617;
    font-size: 16px;
}

.dzai-product-type-description {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 300;
    font-family: 'Roboto', sans-serif;
    margin-top: -8.33px;
}

/* Small descrption */
.woocommerce-product-details__short-description{
    font-size: 14px;
}


/* custom availability styling */
.dzai-availability-wrapper {
    display: block !important;
    max-width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 26px;
    font-size: 14px;
    border: none;
    background-color: #EFEFEF;
    margin: 15px 0px 20px 0px !important;
}

.dzai-availability-wrapper.dzai-available {
    color: #16A34A;
}

.dzai-availability-wrapper.dzai-unavailable {
    color: #991b1b;
}

.dzai-availability-icon {
    font-weight: bold;
    font-size: 16px;
    margin-right: 15px;
}

.dzai-availability-text {
    font-weight: 500;
}

/* hide old description */
.woocommerce-tabs.wc-tabs-wrapper {
    display: none !important;
}

.related.products {
    display: none !important;
}


