/**
 * WooCommerce Custom Styles
 * Custom styling for WooCommerce elements
 */

/* Add to Cart Buttons - Primary Color #1E3A8A */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce .single_add_to_cart_button,
.woocommerce .cart .button,
.woocommerce .cart input.button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #payment #place_order,
.woocommerce-page #payment #place_order {
    background-color: var(--tu-primary) !important;
    color: #ffffff !important;
    border: none !important;
}

/* Hover state for Add to Cart buttons */
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce .single_add_to_cart_button:hover,
.woocommerce .cart .button:hover,
.woocommerce .cart input.button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce #payment #place_order:hover,
.woocommerce-page #payment #place_order:hover {
    background-color: var(--tu-primary) !important;
    color: #ffffff !important;
}

/* Loading state */
.woocommerce a.button.loading,
.woocommerce button.button.loading,
.woocommerce input.button.loading,
.woocommerce #respond input#submit.loading {
    opacity: 0.7;
}

/* Disabled state */
.woocommerce a.button.disabled,
.woocommerce a.button:disabled,
.woocommerce button.button.disabled,
.woocommerce button.button:disabled,
.woocommerce input.button.disabled,
.woocommerce input.button:disabled,
.woocommerce .single_add_to_cart_button.disabled,
.woocommerce .single_add_to_cart_button:disabled {
    background-color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.wc-block-cart__submit-button,
.wc-block-checkout__actions .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
    background-color: var(--tu-primary) !important;
    border-radius: 5px !important;
    text-decoration: none;
    border-color: var(--tu-primary) !important;
    color: #ffffff;
}

.woocommerce ul.order_details{
    padding: 0px !important;
}
.woocommerce-order p{
    color: var(--tu-primary);
    font-size: 20px;
    margin: 0px 0px 30px 0px !important;
}
.woocommerce-thankyou-order-received{
    margin: 0px 0px 50px 0px !important;
    font-size: 26px !important;
    font-weight: bold;
    /* color: var(--tu-primary);
    font-size: 26px; */
}
.auth-card .alert-card-green{
    display: block !important;
    background-color: #5ece5e;
    padding: 20px;
    height: auto;
    border: 1px solid #47a247;
}
.woocommerce div.product .product_title{
    font-size: 28px;
}
.woocommerce-product-details__short-description p {
    margin-top: 10px;
    margin-bottom: 20px;
}
.price span{
    font-size: 24px;
    font-weight: bold;
    color: var(--tu-primary);
}
.stock.in-stock{
    color: var(--tu-primary) !important;
}

/* Contact Form 7 Custom Submit Button */
.cf7-submit-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Hide the original CF7 submit button */
.cf7-submit-wrapper .cf7-custom-submit,
.cf7-submit-wrapper .wpcf7-submit {
    display: none !important;
}

/* Style the submit button to match screenshot exactly */
button[type="submit"].btn-register.btn-send-contact {
    width: 100%;
    border: none;
    background: linear-gradient(90deg, var(--tu-primary) 0%, var(--tu-primary-900) 100%);
    border-radius: 4px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1),
        0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

button[type="submit"].btn-register.btn-send-contact img {
    width: 20px;
    height: 20px;
}

/* Style the transformed button (fallback) */
.cf7-submit-wrapper button[type="submit"] {
    width: 100%;
    border: none;
    background: linear-gradient(90deg, #3b82f6 0%, #3b46ff 100%);
    border-radius: 4px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1),
        0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.cf7-submit-wrapper button[type="submit"] img {
    width: 20px;
    height: 20px;
}

/* Remove default CF7 wrapper <p> tag styling */
.cf7-submit-wrapper p {
    margin: 0;
    padding: 0;
}

.cf7-submit-content {
    pointer-events: none;
    position: relative;
    z-index: 1;
    min-height: 48px;
}

/* Button hover effect - only on hover, not on error */
.wpcf7-form:not(.invalid):not(.wpcf7-invalid) button[type="submit"].btn-register.btn-send-contact:hover,
.wpcf7-form:not(.invalid):not(.wpcf7-invalid) .cf7-submit-wrapper button[type="submit"]:hover {
    background: linear-gradient(90deg, var(--tu-primary) 0%, var(--tu-primary-600) 100%) !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
    box-shadow: 0 6px 8px -4px rgba(0, 0, 0, 0.15),
        0 12px 20px -4px rgba(0, 0, 0, 0.15);
}

.wpcf7-form:not(.invalid):not(.wpcf7-invalid) button[type="submit"].btn-register.btn-send-contact:active,
.wpcf7-form:not(.invalid):not(.wpcf7-invalid) .cf7-submit-wrapper button[type="submit"]:active {
    transform: translateY(0);
    background: linear-gradient(90deg, var(--tu-primary-600) 0%, var(--tu-primary-900) 100%) !important;
    box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Keep button default background on error - don't change styling */
.wpcf7-form.invalid button[type="submit"].btn-register.btn-send-contact,
.wpcf7-form.wpcf7-invalid button[type="submit"].btn-register.btn-send-contact,
.wpcf7-form.invalid button[type="submit"].btn-register.btn-send-contact:hover,
.wpcf7-form.wpcf7-invalid button[type="submit"].btn-register.btn-send-contact:hover,
.wpcf7-form.invalid button[type="submit"].btn-register.btn-send-contact:active,
.wpcf7-form.wpcf7-invalid button[type="submit"].btn-register.btn-send-contact:active,
.wpcf7-form.invalid .cf7-submit-wrapper button[type="submit"],
.wpcf7-form.wpcf7-invalid .cf7-submit-wrapper button[type="submit"],
.wpcf7-form.invalid .cf7-submit-wrapper button[type="submit"]:hover,
.wpcf7-form.wpcf7-invalid .cf7-submit-wrapper button[type="submit"]:hover,
.wpcf7-form.invalid .cf7-submit-wrapper button[type="submit"]:active,
.wpcf7-form.wpcf7-invalid .cf7-submit-wrapper button[type="submit"]:active {
    background: linear-gradient(90deg, #3b82f6 0%, #3b46ff 100%) !important;
    transform: none !important;
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1),
        0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}
.wpcf7-not-valid{
    border-color: #dc3545 !important;
}
.wpcf7-form.invalid{
    /* color: #dc3545 !important; */
}

/* Contact Form 7 Acceptance Checkbox Styling */
.form-check {
    margin-bottom: 0;
}

/* Remove <p> tag styling inside form-check */
.form-check p {
    margin: 0;
    padding: 0;
    display: contents; /* Remove p wrapper effect */
}

.form-check label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--tu-gray-light);
    line-height: 1.5;
    cursor: pointer;
    margin: 0;
}

.form-check input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.form-check .wpcf7-form-control-wrap.privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.form-check .wpcf7-form-control-wrap.privacy .wpcf7-form-control {
    margin-top: 2px;
}

.form-check .wpcf7-form-control-wrap.privacy label {
    font-size: 14px;
    color: var(--tu-gray-light);
    line-height: 1.5;
    cursor: pointer;
    margin: 0;
}

/* Contact Form 7 Error Messages Styling */
.wpcf7-not-valid-tip {
    display: block !important;
    color: #dc3545 !important;
    font-size: 14px;
    margin-top: 5px;
    margin-bottom: 0;
    font-weight: 400;
    position: relative;
    z-index: 10;
}

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.wpcf7-form-control-wrap .wpcf7-not-valid-tip {
    display: block !important;
    margin-top: 5px;
}

.wpcf7-response-output {
    margin: 20px 0 !important;
    padding: 12px 16px !important;
    border: 1px solid #dc3545 !important;
    border-radius: 4px;
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Hide validation error response output (show errors under fields instead) */
.wpcf7-response-output.wpcf7-validation-errors {
    display: none !important;
}

/* Hide empty response output */
.wpcf7-response-output:empty {
    display: none !important;
}

/* Only show response output if it has meaningful content */
.wpcf7-response-output:not(.wpcf7-validation-errors):not(:empty) {
    display: block !important;
}

.wpcf7-response-output.wpcf7-mail-sent-ok {
    border-color: #28a745 !important;
    background-color: #d4edda !important;
    color: #155724 !important;
    display: block !important;
}

.wpcf7-form-control.wpcf7-not-valid {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.wpcf7-form-control.wpcf7-not-valid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.wpcf7-validation-errors {
    display: none !important; /* Hide general error list - show errors under each field instead */
}

/* Hide screen reader response general error list */
.screen-reader-response ul {
    display: none !important;
}

/* Ensure error messages appear directly under input fields */
.wpcf7-form-control-wrap {
    margin-bottom: 0;
}

.wpcf7-form-control-wrap .wpcf7-not-valid-tip {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.btn-send-contactus-color{
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 800;
}
.screen-reader-response{
    display: none !important;
}
.btn-send-contactus-color:disabled{
    background-color: #9ca3af !important;
    cursor: not-allowed;
    opacity: 0.6;
}
.sent .wpcf7-response-output{
    border: 1px solid #3ddc35 !important;
    background-color: #e0f8d7 !important;
    color: #25721c !important;
}
.submitting .wpcf7-response-output{
    display: none !important;
}

/* Product Card Button Alignment */
.tools-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.main-card-body .price-box {
    margin-top: auto;
}

.main-card-body .btn-primary {
    margin-top: 12px;
}
.logout-btn-in-my-account{
    text-decoration: none;
}
.price del span{
    color: var(--tu-gray-light);
}
.product .price del{
    color: inherit;
    opacity: .7;
    display: inline-block;
    position: relative;
    text-decoration: none !important;
}
.product .price del::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50%;
    border-bottom: 1px solid var(--tu-gray-light);
}
.product .price ins{
    text-decoration: none !important;
}

/* Blur price for non-logged-in users */
.price-blurred {
    filter: blur(4px);
    opacity: 0.5;
    user-select: none;
    pointer-events: none;
    position: relative;
}

.price-blurred * {
    filter: blur(4px);
    opacity: 0.5;
}

/* Product Modal Styles */
.ge-product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ge-product-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.ge-product-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    width: 100%;
    max-width: 800px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ge-product-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
    color: #333;
    transition: color 0.3s;
}

.ge-product-modal-close:hover {
    color: #000;
}

.ge-product-modal-body {
    padding: 40px;
    position: relative;
}

.ge-product-modal-loading {
    text-align: center;
    padding: 40px;
}

.ge-product-modal-content-inner {
    /* Product content styles */
}

body.ge-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .ge-product-modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .ge-product-modal-body {
        padding: 20px;
    }
}

/* Cart button - icon wrap and count badge */
.nav-cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: var(--tu-green);
    border-radius: 9px;
    box-sizing: border-box;
}
.nav-cart-count-zero {
    display: none;
}

/* Cart button active state - white icon */
.nav-cart-btn.nav-link-active svg,
.nav-cart-btn.nav-link-active svg *,
.nav-cart-btn.nav-link-active svg circle,
.nav-cart-btn.nav-link-active svg path {
    stroke: #ffffff !important;
}
.nav-cart-btn.active svg{
    stroke: #ffffff !important;
}

/* Add to Cart button hover */
.ge-product-modal-trigger:not(.ge-btn-disabled):hover {
    opacity: 0.5 !important;
    transition: opacity 0.2s ease;
}

/* Disabled Add to Cart button on product cards */
.ge-product-modal-trigger.ge-btn-disabled,
.ge-product-modal-trigger.ge-btn-disabled:hover {
    background-color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}
.fixed-width-btn{
    min-width: 130px !important;
}

/* ==========================================================================
   Single product — quantity selector + Add to cart alignment
   ========================================================================== */
.woocommerce div.product form.cart {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.woocommerce div.product form.cart .quantity {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #d5d9df;
    border-radius: 5px;
    overflow: hidden;
    height: 48px;
    margin: 0;
    float: none;
    box-sizing: border-box;
}

.woocommerce div.product form.cart .quantity input.qty {
    width: 64px;
    height: 100%;
    border: 0;
    padding: 0;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: #161f28;
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
    box-shadow: none;
}

.woocommerce div.product form.cart .quantity input.qty:focus {
    outline: none;
    box-shadow: none;
    border-color: var(--tu-primary);
}

.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce div.product form.cart button.single_add_to_cart_button {
    height: 48px;
    min-height: 48px;
    line-height: 1;
    padding: 0 28px;
    margin: 0;
    border: 0;
    border-radius: 5px;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-sizing: border-box;
}

/* ==========================================================================
   Single product — meta (break before Category)
   ========================================================================== */
.woocommerce div.product .product_meta .posted_in {
    display: block;
    margin-top: 8px;
}

/* ==========================================================================
   Single product — two-column layout (gallery + summary)
   Woo floats the gallery left and .summary right without clearing them, which
   collapses div.product to ~0 height and lets the footer overlap it. Use flex
   instead: it contains the children and gives the summary real width.
   ========================================================================== */
.woocommerce div.product {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px;
}

/* Full-width rows below the two columns (tabs, related, up-sells, notices) */
.woocommerce div.product > .woocommerce-tabs,
.woocommerce div.product > .related,
.woocommerce div.product > .up-sells,
.woocommerce div.product > .woocommerce-product-rating {
    flex: 0 0 100%;
    width: 100%;
}

/* ==========================================================================
   Single product — fixed image + container sizing
   ========================================================================== */
.woocommerce div.product .woocommerce-product-gallery {
    flex: 0 0 480px;
    width: 480px;
    max-width: 100%;
    margin: 0;
    float: none;
}

.woocommerce div.product .summary.entry-summary {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin: 0;
    float: none;
}

.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: 480px;
    height: 480px;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .woocommerce div.product {
        gap: 24px;
    }

    .woocommerce div.product .woocommerce-product-gallery,
    .woocommerce div.product .summary.entry-summary {
        flex: 0 0 100%;
        width: 100%;
    }

    .woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
        width: 100%;
        height: auto;
    }
}

/* ==========================================================================
   Related products — divider line above, compact single-row grid
   ========================================================================== */
.woocommerce .related.products {
    border-top: 1px solid var(--tu-gray-light);
    padding-top: 24px;
    margin-top: 32px;
    clear: both;
    margin-bottom: 25px;
}


.woocommerce .related.products > h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

/* Lay the products out as a single, no-wrap flex row (overrides Woo floats) */
.woocommerce .related.products ul.products {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce .related.products ul.products li.product {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    float: none;
    margin: 0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    text-align: center;
    border: 1px solid #a7b7c5;
    border-radius: 10%;
}

/* Fixed image box inside related product cards */
.woocommerce .related.products ul.products li.product a img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin: 0 0 12px 0;
    display: block;
}

/* Product name — secondary color, fixed slot so cards align */
.woocommerce .related.products ul.products li.product .woocommerce-loop-product__title {
    color: #767676 !important;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    margin: 0 0 8px 0;
    min-height: 40px;
}

/* Price — secondary color, pushed to the bottom of the card */
.woocommerce .related.products ul.products li.product .price,
.woocommerce .related.products ul.products li.product .price span,
.woocommerce .related.products ul.products li.product .price ins,
.woocommerce .related.products ul.products li.product .price .woocommerce-Price-amount {
    color: #767676 !important;
    font-size: 18px;
    font-weight: 700;
    margin: auto 0 12px 0;
}

/* Add to cart button — secondary color, aligned at card bottom */
.woocommerce .related.products ul.products li.product a.button,
.woocommerce .related.products ul.products li.product a.add_to_cart_button {
    background-color: var(--tu-primary) !important;
    color: #ffffff !important;
    border: none !important;
    align-self: center;
    transition: opacity 0.2s ease;
}

/* Hover — decrease opacity */
.woocommerce .related.products ul.products li.product a.button:not(.disabled):hover,
.woocommerce .related.products ul.products li.product a.add_to_cart_button:not(.disabled):hover {
    opacity: 0.5 !important;
}

@media (max-width: 768px) {
    .woocommerce .related.products ul.products li.product {
        width: calc(50% - 12px);
    }
}

@media (max-width: 480px) {
    .woocommerce .related.products ul.products li.product {
        width: 100%;
    }
}