/*
 * DigiFlow WooCommerce Premium Adjustments
 */
/* Layout Wrapper */
.woocommerce div.product { margin-bottom: 4rem; }

/* Grid Wrapper for Shop Page */
.woocommerce ul.products, .woocommerce-page ul.products {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}
.woocommerce ul.products::before, .woocommerce ul.products::after {
    display: none;
}
@media (min-width: 640px) {
    .woocommerce ul.products, .woocommerce-page ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .woocommerce.columns-3 ul.products, .woocommerce-page.columns-3 ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .woocommerce.columns-4 ul.products, .woocommerce-page.columns-4 ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Product Cards - Minimal Resets now that we replaced wrappers */
.digiflow-product .price {
    color: #0f172a;
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.2;
}
.digiflow-product .price del, .digiflow-product .price del span {
    font-size: 0.75rem !important; /* text-xs */
    color: #9ca3af !important; /* text-gray-400 */
    text-decoration: line-through !important;
    font-weight: 400 !important;
    margin-right: 0.25rem;
}
.digiflow-product .price ins, .digiflow-product .price ins span,
.digiflow-product .price > span.amount {
    font-size: 1.25rem !important; /* text-xl */
    font-weight: 700 !important; /* font-bold */
    color: #111827 !important; /* text-gray-900 */
    text-decoration: none !important;
}

/* Rating Override */
.digiflow-product .star-rating {
    font-size: 0.875rem;
    color: #14b8a6;
    margin: 0;
    float: none;
}
.digiflow-product .star-rating::before {
    color: #ccfbf1;
}

.digiflow-product a img {
    margin: 0;
    box-shadow: none;
    border-bottom: none;
}

/* Override default title */
.digiflow-product .woocommerce-loop-product__title { display: none; }

/* Custom Add to Cart Button Reset */
.woocommerce a.added_to_cart {
    display: none !important;
}

/* Utilities missing from Tailwind config */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}
/* Custom scrollbar for a polished look */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Result count reset */
.result-count-reset p.woocommerce-result-count {
    margin: 0 !important;
    padding: 0 !important;
}

/* Breadcrumb Reset */
.woocommerce-breadcrumb a {
    color: #475569;
    transition: color 0.15s ease-in-out;
}
.woocommerce-breadcrumb a:hover {
    color: #0d9488;
}

/* Sidebar Enhancements */
.shop-sidebar .widget {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #f1f5f9;
}
.shop-sidebar .widget:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}
.shop-sidebar .widget .widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.shop-sidebar .widget .widget-title::after {
    content: ""; /* Up chevron */
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 15l7-7 7 7'/%3E%3C/svg%3E");
    background-size: cover;
}

/* Category Checkbox Style Replicas */
.shop-sidebar ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}
.shop-sidebar ul li {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    margin-bottom: 0 !important;
    cursor: pointer !important;
    width: 100% !important;
}
.shop-sidebar ul li > ul {
    flex-basis: 100% !important;
    width: 100% !important;
    padding-left: 1.5rem !important;
    margin-top: 0.75rem !important;
}
.shop-sidebar ul li a {
    color: #4b5563 !important;
    font-size: 0.875rem !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    transition: color 0.15s ease-in-out !important;
    flex-grow: 1 !important;
}
.shop-sidebar ul li a::before {
    content: "" !important;
    display: inline-block !important;
    width: 1rem !important; /* w-4 */
    height: 1rem !important; /* h-4 */
    border-radius: 0.25rem !important; /* rounded */
    border: 1px solid #d1d5db !important; /* border-gray-300 */
    margin-right: 0.75rem !important; /* ml-3 */
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
}
.shop-sidebar ul li:hover a {
    color: #0d9488 !important;
}
.shop-sidebar ul li:hover a::before {
    border-color: #0d9488 !important;
}
.shop-sidebar ul li.current-cat a {
    color: #1f2937 !important; /* matches dark gray text */
}
.shop-sidebar ul li.current-cat a::before {
    background-color: #0ea5e9 !important; /* Blue checkbox to match mockup */
    border-color: #0ea5e9 !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.shop-sidebar ul li .count,
.shop-sidebar ul li.cat-item span.count {
    font-size: 0.75rem !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    padding: 0.125rem 0.5rem !important;
    border-radius: 9999px !important;
    line-height: 1 !important;
    margin-left: auto !important;
}

/* Catalog Ordering Overrides */
.digiflow-ordering-wrapper form.woocommerce-ordering {
    margin: 0 !important;
}
.digiflow-ordering-wrapper select.orderby {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    outline: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Pagination Overrides */
.digiflow-pagination nav.woocommerce-pagination ul {
    border: none;
    gap: 0.5rem;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.digiflow-pagination nav.woocommerce-pagination ul li { border: none; display: inline-flex; }
.digiflow-pagination nav.woocommerce-pagination ul li a, 
.digiflow-pagination nav.woocommerce-pagination ul li span {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 0.5rem;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-weight: 500;
    font-size: 1rem;
    padding: 0;
    transition: all 0.2s ease;
    margin: 0;
}
.digiflow-pagination nav.woocommerce-pagination ul li a:hover {
    background: #f8fafc;
    color: #4f46e5;
}
.digiflow-pagination nav.woocommerce-pagination ul li span.current {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
} /* End Pagination */

/* Clean Checkout Forms */
.woocommerce form.checkout_coupon, 
.woocommerce form.login, 
.woocommerce form.register {
    border: 1px solid #f1f5f9;
    padding: 2rem;
    border-radius: 1.25rem;
    background-color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #0f172a;
}
.woocommerce form .form-row input.input-text:focus, 
.woocommerce form .form-row textarea:focus {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Widget Title Overrides */
.shop-sidebar .widget .widget-title::after {
    content: ""; /* Up chevron */
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 15l7-7 7 7'/%3E%3C/svg%3E");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Price Filter Widget Setup */
.shop-sidebar .widget_price_filter .price_slider_wrapper { margin-top: 1rem; }
.shop-sidebar .widget_price_filter .ui-slider {
    position: relative;
    background-color: #e2e8f0;
    height: 4px;
    border-radius: 4px;
    margin-bottom: 2rem;
}
.shop-sidebar .widget_price_filter .ui-slider .ui-slider-range {
    position: absolute;
    height: 100%;
    background-color: #14b8a6; /* Teal line */
    border-radius: 4px;
}
.shop-sidebar .widget_price_filter .ui-slider .ui-slider-handle {
    position: absolute;
    top: -6px; /* - (16px / 2) + 2px slider half */
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 3px solid #14b8a6; /* Teal border */
    border-radius: 50%;
    cursor: ew-resize;
    outline: none;
    z-index: 2;
    margin-left: -8px; 
    box-sizing: border-box;
}
.shop-sidebar .widget_price_filter .price_slider_amount {
    display: flex;
    flex-direction: column;
}
.shop-sidebar .widget_price_filter .price_slider_amount .price_label {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: #475569;
    font-size: 0.875rem;
    order: -1; /* Move price above the button */
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.shop-sidebar .widget_price_filter .price_slider_amount .button {
    width: 100%;
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.shop-sidebar .widget_price_filter .price_slider_amount .button:hover { background-color: #f1f5f9; }
.shop-sidebar .widget_price_filter .price_slider_amount .clear { display: none !important; }

/* Product Tags Cloud (Compatibility style wrappers) */
.shop-sidebar .widget_product_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.shop-sidebar .widget_product_tag_cloud .tagcloud a {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem !important; /* Overwrite WC inline font sizes */
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    background: transparent;
    transition: all 0.2s;
}
.shop-sidebar .widget_product_tag_cloud .tagcloud a:hover {
    border-color: #14b8a6;
    color: #0f172a;
}
/* Ensure tag checkboxes are hidden if the category checkbox rule applies globally */
.shop-sidebar .widget_product_tag_cloud .tagcloud a::before { display: none !important; }
/* Simulated active tag based on WooCommerce defaults */
.shop-sidebar .widget_product_tag_cloud .tagcloud a.current-tag,
.shop-sidebar .widget_product_tag_cloud .tagcloud a[class*="active"] {
    border-color: #14b8a6;
    color: #0f172a;
}

/* 
 * WOOCOMMERCE BLOCKS (Gutenberg) COMPATIBILITY 
 * Apply our exact mockup styles to modern block-based widgets 
 */

/* Block Widget Titles */
.shop-sidebar h1.wp-block-heading,
.shop-sidebar h2.wp-block-heading,
.shop-sidebar h3.wp-block-heading,
.shop-sidebar h4.wp-block-heading,
.shop-sidebar h5.wp-block-heading,
.shop-sidebar h6.wp-block-heading,
.shop-sidebar .wc-block-components-title {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-top: 1px solid #f1f5f9;
    padding-top: 2rem;
    margin-top: 2rem;
}
.shop-sidebar *:first-child > .wp-block-heading,
.shop-sidebar *:first-child > .wc-block-components-title {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.shop-sidebar h1.wp-block-heading::after,
.shop-sidebar h2.wp-block-heading::after,
.shop-sidebar h3.wp-block-heading::after,
.shop-sidebar h4.wp-block-heading::after,
.shop-sidebar h5.wp-block-heading::after,
.shop-sidebar h6.wp-block-heading::after,
.shop-sidebar .wc-block-components-title::after {
    content: "" !important; /* Up chevron */
    display: inline-block !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 15l7-7 7 7'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
}

/* Checkbox Blocks (Categories / Attribute Filters) */
.shop-sidebar .wc-block-components-checkbox-list,
.shop-sidebar .wc-block-product-categories-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}
.shop-sidebar .wc-block-components-checkbox-list li {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}
.shop-sidebar .wc-block-components-checkbox-list li > ul {
    width: 100% !important;
    padding-left: 1.5rem !important;
    margin-top: 0.75rem !important;
}
.shop-sidebar .wc-block-components-checkbox {
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
}
.shop-sidebar .wc-block-components-checkbox label {
    display: flex !important;
    align-items: center !important;
    color: #4b5563 !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
    width: 100% !important;
}
.shop-sidebar .wc-block-components-checkbox svg.wc-block-components-checkbox__mark,
.shop-sidebar .wc-block-components-checkbox input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 1rem !important;
    height: 1rem !important;
    border-radius: 0.25rem !important;
    border: 1px solid #d1d5db !important;
    background-color: transparent !important;
    margin-right: 0.75rem !important;
    cursor: pointer !important;
    display: inline-block !important;
    position: relative !important;
    outline: none !important;
    box-shadow: none !important;
}
.shop-sidebar .wc-block-components-checkbox input[type="checkbox"]:checked {
    background-color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Fix text and count alignment */
.shop-sidebar .wc-block-components-product-categories-list-item-count,
.shop-sidebar .wc-block-components-checkbox-list-item-count {
    font-size: 0.75rem !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    padding: 0.125rem 0.5rem !important;
    border-radius: 9999px !important;
    line-height: 1 !important;
    margin-left: auto !important;
}
/* Hide the parentheses that WooCommerce injects dynamically via JS/CSS */
.shop-sidebar .wc-block-components-checkbox-list-item-count::before,
.shop-sidebar .wc-block-components-checkbox-list-item-count::after,
.shop-sidebar .wc-block-components-product-categories-list-item-count::before,
.shop-sidebar .wc-block-components-product-categories-list-item-count::after {
    display: none !important;
}


/* Block Price Filter (Bulletproof Slider Interactions) */
.shop-sidebar .wc-block-components-price-slider { margin-top: 1rem !important; margin-bottom: 2.5rem !important; }
.shop-sidebar .wc-block-components-price-slider__range-input-wrapper { background: #e2e8f0 !important; height: 4px !important; border-radius: 4px !important; position: relative !important; margin-bottom: 1.5rem !important; }
.shop-sidebar .wc-block-components-price-slider__range-input-progress { background: #14b8a6 !important; height: 100% !important; border-radius: 4px !important; position: absolute !important; left: 0; pointer-events: none !important; }
.shop-sidebar .wc-block-components-price-slider__range-input-wrapper input[type="range"] {
    position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 4px !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: none !important; outline: none !important; appearance: none !important; -webkit-appearance: none !important; pointer-events: none !important; z-index: 10 !important; border-radius: 4px !important;
}
.shop-sidebar .wc-block-components-price-slider__range-input-wrapper input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto !important; appearance: none !important; -webkit-appearance: none !important; cursor: grab !important; width: 16px !important; height: 16px !important; background: #ffffff !important; border: 3px solid #14b8a6 !important; border-radius: 50% !important; z-index: 20 !important; margin-top: -6px !important; transform: none !important;
}
.shop-sidebar .wc-block-components-price-slider__range-input-wrapper input[type="range"]::-moz-range-thumb {
    pointer-events: auto !important; appearance: none !important; -moz-appearance: none !important; cursor: grab !important; width: 10px !important; height: 10px !important; background: #ffffff !important; border: 3px solid #14b8a6 !important; border-radius: 50% !important; z-index: 20 !important; transform: none !important;
}
.shop-sidebar .wc-block-components-price-slider__range-input-wrapper input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing !important; }
.shop-sidebar .wc-block-components-price-slider__range-input-wrapper input[type="range"]:active::-moz-range-thumb { cursor: grabbing !important; }
.shop-sidebar .wc-block-components-price-slider__amount { display: flex !important; justify-content: space-between !important; width: 100% !important; margin: 0 !important; padding: 0 !important; flex-direction: row !important; color: #475569 !important; font-size: 0.875rem !important; font-weight: 500 !important; }
.shop-sidebar .wc-block-components-price-slider__amount input { font-size: 0.875rem !important; font-weight: 500 !important; color: #475569 !important; padding: 0.1rem 0 !important; background: transparent !important; border: none !important; max-width: 4rem !important; }
.shop-sidebar .wc-block-price-filter__button {
    width: 100% !important; background: #f8fafc !important; color: #1e293b !important; font-weight: 600 !important; font-size: 0.875rem !important; padding: 0.75rem 1rem !important; border-radius: 0.5rem !important; text-align: center !important; border: none !important; cursor: pointer !important; transition: background-color 0.2s !important; margin-top: 1rem !important;
}
.shop-sidebar .wc-block-price-filter__button:hover { background: #f1f5f9 !important; }

/* Legacy Widget Drag Physics Patch */
.shop-sidebar .widget_price_filter .ui-slider .ui-slider-handle {
    pointer-events: auto !important;
    cursor: grab !important;
    z-index: 5 !important;
}
.shop-sidebar .widget_price_filter .ui-slider .ui-slider-handle:active {
    cursor: grabbing !important;
}
.shop-sidebar .widget_price_filter .price_slider_wrapper { position: relative; z-index: 10; }

/* Single Product Overrides */
/* Variable Product Form Fix */
.digiflow-add-to-cart-wrapper form.variations_form { display: flex !important; flex-direction: column !important; gap: 1.5rem !important; width: 100% !important; border: none !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; }
.digiflow-add-to-cart-wrapper table.variations { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.digiflow-add-to-cart-wrapper table.variations td, .digiflow-add-to-cart-wrapper table.variations th { padding: 0; border: none; background: transparent; vertical-align: middle; }
.digiflow-add-to-cart-wrapper table.variations td.label { font-weight: 600; color: #1e293b; width: auto; padding-right: 1.5rem; padding-bottom: 1rem; }
.digiflow-add-to-cart-wrapper table.variations td.value { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; flex-wrap: wrap; }
.digiflow-add-to-cart-wrapper table.variations select { appearance: none; background: #f8fafc url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.75rem center/1.25em 1.25em; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 0.75rem 2.5rem 0.75rem 1rem; font-weight: 500; font-size: 1rem; color: #0f172a; cursor: pointer; outline: none; transition: border-color 0.2s, box-shadow 0.2s; min-width: 15rem; }
.digiflow-add-to-cart-wrapper table.variations select:focus { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.digiflow-add-to-cart-wrapper a.reset_variations { color: #64748b; font-size: 0.875rem; text-decoration: none; font-weight: 500; padding: 0.5rem 0.5rem; border-radius: 0.5rem; transition: background-color 0.2s, color 0.2s; display: inline-flex; align-items: center; }
.digiflow-add-to-cart-wrapper a.reset_variations:hover { background-color: #fee2e2; color: #ef4444; }
.digiflow-add-to-cart-wrapper .single_variation_wrap { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; width: 100%; transition: all 0.3s; }
.digiflow-add-to-cart-wrapper .woocommerce-variation-price { font-size: 1.5rem; font-weight: 700; color: #0f172a; line-height: 1.2; margin-bottom: -0.5rem; }
.digiflow-add-to-cart-wrapper .woocommerce-variation-add-to-cart { display: flex; flex-direction: column; gap: 1rem; width: 100%; margin-top: 0.5rem; }
@media(min-width: 640px) { .digiflow-add-to-cart-wrapper .woocommerce-variation-add-to-cart { flex-direction: row; align-items: stretch; } }

/* Simple Product Overrides */
.digiflow-add-to-cart-wrapper form.cart:not(.variations_form) { display: flex; flex-direction: column; gap: 1rem; width: 100%; border: none !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; }
@media(min-width: 640px) { .digiflow-add-to-cart-wrapper form.cart:not(.variations_form) { flex-direction: row; align-items: stretch; } }
.digiflow-add-to-cart-wrapper .quantity { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.75rem; display: flex; justify-content: center; width: 100px; flex-shrink: 0; }
.digiflow-add-to-cart-wrapper .quantity [type="number"] { background: transparent; border: none; outline: none; width: 100%; text-align: center; color: #0f172a; font-weight: 600; font-size: 1.125rem; }
.digiflow-add-to-cart-wrapper button.single_add_to_cart_button {
    flex: 1;
    background: #0d9488 !important;
    color: white !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    font-size: 1.125rem !important;
    transition: all 0.2s !important;
    box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.digiflow-add-to-cart-wrapper button.single_add_to_cart_button:hover { background: #115e59 !important; transform: translateY(-2px); box-shadow: 0 15px 20px -3px rgba(13, 148, 136, 0.5) !important; }

/* Hide default output since we loop our own */
.woocommerce-product-gallery { display: none !important; }

/* Single Product Tabs Styling Overrides */
.digiflow-tab-content h2, .digiflow-tab-content h3 { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin-bottom: 1rem; }
.digiflow-tab-content p { color: #475569; line-height: 1.7; margin-bottom: 1rem; }

/* Remove old WooCommerce Tabs Native display */
.woocommerce-tabs.wc-tabs-wrapper { display: none !important; }

/* Ensure Related Products grids properly inside the wrapper */
.digiflow-related-wrapper ul.products { display: grid !important; grid-template-columns: repeat(1, minmax(0, 1fr)) !important; gap: 1.5rem !important; }
@media (min-width: 640px) { .digiflow-related-wrapper ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (min-width: 768px) { .digiflow-related-wrapper ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (min-width: 1024px) { .digiflow-related-wrapper ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
.digiflow-related-wrapper section.related.products h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin-bottom: 2rem; }

/* --------------------------------------------------------
   WooCommerce Payment Gateway Overrides
-------------------------------------------------------- */
.woocommerce-checkout-payment ul.wc_payment_methods {
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    gap: 1rem;
}
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method {
    border: 1px solid #e2e8f0; 
    border-radius: 0.75rem; 
    overflow: hidden; 
    transition: all 0.2s; 
    background: #f8fafc;
}
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method:focus-within {
    border-color: #5855f5; 
    box-shadow: 0 0 0 1px #5855f5;
}
.woocommerce-checkout-payment ul.wc_payment_methods li label {
    display: flex; 
    align-items: center; 
    padding: 1rem; 
    cursor: pointer; 
    font-weight: 700; 
    color: #0f172a; 
    margin: 0; 
    width: 100%;
}
.woocommerce-checkout-payment ul.wc_payment_methods li label:before {
    content: ''; 
    display: inline-block; 
    width: 1.25rem; 
    height: 1.25rem; 
    border: 2px solid #cbd5e1; 
    border-radius: 50%; 
    margin-right: 0.75rem; 
    background: #fff; 
    transition: all 0.2s;
}
.woocommerce-checkout-payment ul.wc_payment_methods li input[type="radio"] {
    display: none;
}
.woocommerce-checkout-payment ul.wc_payment_methods li input[type="radio"]:checked + label:before {
    border-color: #5855f5; 
    background-color: #5855f5; 
    box-shadow: inset 0 0 0 3px #fff;
}
.woocommerce-checkout-payment .payment_box {
    padding: 1rem; 
    background: #fff; 
    border-top: 1px solid #f1f5f9; 
    font-size: 0.875rem; 
    color: #64748b;
}

/* Place Order Button standardizer */
#place_order {
    width: 100%;
    background-color: #5855f5;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s;
}
#place_order:hover {
    background-color: #4a47d1;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* GLOBALLY Re-Style WooCommerce Notices to be Clean and Minimal, NOT floating */
.woocommerce-error, .woocommerce-info, .woocommerce-message {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    padding: 1rem 1.25rem !important;
    margin: 0 auto 2rem auto !important;
    max-width: 64rem !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    top: 0 !important; left: 0 !important; z-index: auto !important;
    animation: none !important; backdrop-filter: none !important;
    list-style: none !important;
}
.woocommerce-message { border-left: 4px solid #10b981 !important;  bottom: auto !important;}
.woocommerce-error { border-left: 4px solid #ef4444 !important; bottom: auto !important;}
.woocommerce-info { border-left: 4px solid #3b82f6 !important; bottom: auto !important;}
.woocommerce-message::before, .woocommerce-error::before, .woocommerce-info::before {
    content: '' !important; display: inline-block !important; width: 1.5rem !important; height: 1.5rem !important;
    border-radius: 50% !important; margin-right: 0.75rem !important; position: static !important;
    box-shadow: none !important; background-color: transparent !important; flex-shrink: 0 !important;
}
.woocommerce-message::before { background: #10b981 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E") center/14px no-repeat !important; }
.woocommerce-error::before { background: #ef4444 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E") center/14px no-repeat !important; }
.woocommerce-message .button, .woocommerce-error .button, .woocommerce-info .button {
    margin-left: auto !important; background: #f1f5f9 !important; color: #475569 !important; padding: 0.5rem 1rem !important;
    font-weight: 700 !important; border-radius: 0.5rem !important; border: none !important; transition: all 0.2s !important;
    text-decoration: none !important; font-size: 0.8125rem !important;
}
.woocommerce-message .button:hover, .woocommerce-error .button:hover, .woocommerce-info .button:hover { background: #e2e8f0 !important; color: #0f172a !important; }

/* ========================================================
   CHECKOUT REVIEW ORDER TABLE
   ======================================================== */
.woocommerce-checkout-review-order-table thead { display: none !important; }
.woocommerce-checkout-review-order-table tbody td { border-bottom: 1px dashed #e2e8f0; padding: 1rem 0; }
.woocommerce-checkout-review-order-table tfoot th, .woocommerce-checkout-review-order-table tfoot td { padding: 1.25rem 0; border-bottom: 1px dashed #e2e8f0; font-size: 0.875rem; }
.woocommerce-checkout-review-order-table tfoot tr.order-total th, .woocommerce-checkout-review-order-table tfoot tr.order-total td { border-bottom: none; font-size: 1.125rem; border-top: 2px solid #e2e8f0; }
.product-quantity { font-weight: 800; color: #64748b; font-size: 0.75rem; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }

/* ========================================================
   SaaS CHECKOUT PAYMENT CARDS UI
   ======================================================== */
.woocommerce-checkout-payment ul.wc_payment_methods { margin-bottom: 1.5rem !important; }
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method {
    border: 2px solid #f1f5f9 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    margin-bottom: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method:hover {
    border-color: #e2e8f0 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05) !important;
}
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method label {
    padding: 1.25rem !important; font-size: 0.95rem !important;
}
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method input:checked + label {
    color: #4f46e5 !important;
}
/* The active/glow state */
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method:has(input:checked) {
    border-color: #4f46e5 !important;
    background: #fcfcff !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
}
.woocommerce-checkout-payment ul.wc_payment_methods li.wc_payment_method:has(input:checked) label::before {
    border-color: #4f46e5 !important; background-color: #4f46e5 !important; box-shadow: inset 0 0 0 3px #fff !important;
}
.woocommerce-checkout-payment .payment_box {
    background: transparent !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding: 1rem 1.25rem !important;
    color: #64748b !important;
}

/* ========================================================
   DIGITAL CART PAGE - BASE COMPONENT STYLES
   Layout styles are inline in cart.php template.
   ======================================================== */

/* Cart Item Card Base */
.digi-cart-item {
    transition: all 0.2s ease;
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}
.digi-cart-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}
.digi-cart-item.removing {
    opacity: 0.5;
    transform: translateX(-20px);
    pointer-events: none;
}

/* Thumbnail Image */
.digi-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Quantity Controls */
.digi-qty-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f8fafc;
}
.digi-qty-wrapper button {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.875rem;
    transition: background 0.15s ease;
}
.digi-qty-wrapper button:hover {
    background: #e2e8f0;
}
.digi-qty-wrapper button:active {
    transform: scale(0.95);
}
.digi-qty-wrapper input[type="number"] {
    -moz-appearance: textfield;
    width: 2.25rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none !important;
}
.digi-qty-wrapper input[type="number"]::-webkit-inner-spin-button,
.digi-qty-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* License Switcher */
.digi-license-btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    color: #64748b;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}
.digi-license-btn.active {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 700;
}
.digi-license-btn:not(.active):hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* Support Toggle */
.digi-support-toggle {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    color: #4f46e5;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}
.digi-support-toggle:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* Remove Button */
.digi-remove-btn {
    color: #94a3b8;
    padding: 0.375rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.digi-remove-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* Upsell Button */
.digi-upsell-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.625rem;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.digi-upsell-btn:hover {
    transform: translateY(-1px);
    background: #e2e8f0;
}
.digi-upsell-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}
.digi-upsell-btn.added {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

/* Toast Notification */
#digi-cart-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #1e293b;
    background: #0f172a;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
}
#digi-cart-toast.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Cart Page Background */
.digi-cart-page {
    background: #f8fafc;
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* Coupon Input Focus State */
.digi-coupon-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* WhatsApp Chat Button */
.whatsapp-chat-btn {
    transition: all 0.2s ease;
}
.whatsapp-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* WooCommerce Cart Form Reset */
.woocommerce-cart-form {
    margin: 0;
    padding: 0;
}
.woocommerce-cart-form .cart_item {
    display: block !important;
    border: none !important;
    background: transparent !important;
}

/* Cart Totals Sidebar */
.cart-collaterals .cart_totals {
    width: 100% !important;
    float: none !important;
}

/* WC Messages */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
    background: #fff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    padding: 1rem 1.25rem !important;
    margin: 0 auto 1.5rem !important;
    max-width: 56rem !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    list-style: none !important;
}
.woocommerce-message { border-left: 4px solid #10b981 !important; }
.woocommerce-error { border-left: 4px solid #ef4444 !important; }
.woocommerce-info { border-left: 4px solid #3b82f6 !important; }

/* Screen Reader Text (for hidden update button) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Hidden utility */
.hidden { display: none !important; }
