/*
Theme Name: Hello Child
Theme URI: https://yourwebsite.com
Description: Child Theme for Elementor Hello Theme
Author: Faraz Ali Khan
Author URI: https://yourwebsite.com
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-child
*/
/* --- Main overlay panel --- */
.dgwt-wcas-overlay-mobile {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: 100% !important;
  max-width: 600px !important;
  height: 100% !important;

  /* Hidden off-screen to the right */
  transform: translateX(100%) !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;

  z-index: 2147483647 !important;
  background: #ffffff !important;
  box-shadow: -5px 0 25px rgba(0,0,0,0.25);
  overflow-y: auto !important;
  display: block !important;
  visibility: visible !important;
  pointer-events: none !important;  /* prevent clicks when hidden */
}

/* --- OPEN STATE: triggered by class on <html> --- */
html.dgwt-wcas-overlay-mobile-on .dgwt-wcas-overlay-mobile {
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

/* --- Suggestions dropdown inside the panel --- */
.dgwt-wcas-suggestions-wrapp {
  width: calc(100% - 30px) !important;
  left: 15px !important;
  max-height: 70vh !important;
}
/* ===========================================================
   WOOCOMMERCE MY ACCOUNT - FINAL RESPONSIVE LAYOUT
   =========================================================== */

/* --- CLEAR FLOATS --- */
.woocommerce-account .woocommerce::after,
.woocommerce-account .woocommerce::before {
    content: "";
    display: table;
    clear: both;
}

/* --- DESKTOP LAYOUT (Side-by-Side) --- */
@media (min-width: 769px) {
    /* Left Sidebar */
    .woocommerce-account .woocommerce-MyAccount-navigation {
        float: left !important;
        width: 22% !important; /* Reduced slightly to create a gap */
        margin-right: 3% !important; /* Creates space between sidebar and content */
        box-sizing: border-box !important;
    }
    
    /* Right Content */
    .woocommerce-account .woocommerce-MyAccount-content {
        float: left !important;
        width: 75% !important;
        box-sizing: border-box !important;
    }

    /* Clean up sidebar links */
    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li {
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        display: block !important;
        padding: 15px 0 !important;
        text-decoration: none !important;
        color: #2C3E50 !important;
        font-weight: 500 !important;
    }
}

/* --- MOBILE & TABLET LAYOUT (Stacked) --- */
@media (max-width: 768px) {
    /* Stack Sidebar and Content Full Width */
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .woocommerce-MyAccount-content {
        float: none !important;
        width: 100% !important;
        margin: 0 0 30px 0 !important;
        padding: 0 !important;
    }
    
    /* Mobile Navigation Buttons (Grid style) */
    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .woocommerce-account .woocommerce-MyAccount-navigation ul li {
        flex: 1 1 calc(50% - 10px) !important; /* 2 items per row */
        margin: 0 !important;
        border: none !important;
    }
    
    .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        display: block !important;
        background-color: #F4F3EA !important; /* Beige background */
        color: #2C3E50 !important;
        padding: 12px 10px !important;
        text-align: center !important;
        text-decoration: none !important;
        border-radius: 4px !important;
        font-size: 14px !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Force all WooCommerce tables to scroll horizontally on small screens */
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table,
    .woocommerce-account .woocommerce-orders-table__wrapper {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        border: none !important;
    }
}
/* ===========================================================
   GLOBAL BUTTON COLOR OVERRIDE (#004741)
   =========================================================== */

/* Normal State for ALL Buttons */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.wp-block-button__link,
.elementor-button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce-MyAccount-content a.button {
    background-color: #004741 !important;
    color: #FFFFFF !important; /* White text for contrast */
    border: 1px solid #004741 !important;
    border-radius: 4px !important; /* Adjust or remove if you want square/round buttons */
    box-shadow: none !important;
    text-shadow: none !important;
    transition: all 0.3s ease !important;
}

/* Hover State (Slightly darker green on mouse hover) */
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover,
.elementor-button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce-MyAccount-content a.button:hover {
    background-color: #004c3a !important; /* Darker green */
    border-color: #004c3a !important;
    color: #FFFFFF !important;
}

/* =========================================================
   WAPF TEXT SWATCHES — STRICTLY UNIFORM FIXED SIZING
========================================================= */

/* 1. Global Box Sizing */
html body .wapf .custom-swatch-wrapper,
html body .wapf .custom-swatch-wrapper *,
html body .wapf .custom-swatch-btn {
    box-sizing: border-box !important;
}

/* 2. Swatch Wrapper */
html body .wapf .custom-swatch-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 10px !important;
}

/* 3. Swatch Buttons (Strict Fixed Sizing to ensure 100% matching sizes) */
html body .wapf .custom-swatch-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* HARDCODED DIMENSIONS - This forces all buttons to match exactly */
    width: 72px !important; 
    min-width: 72px !important;
    max-width: 72px !important;
    
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    
    padding: 6px !important;
    margin: 0 !important;
    
    background: #FAF8F3 !important;
    background-color: #FAF8F3 !important;
    
    /* Start with a 2px transparent/gray border to prevent layout jumping on hover */
    border: 2px solid #E2DFD2 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

/* 4. Text & Elements Inside Swatches */
html body .wapf .custom-swatch-btn > span {
    display: block !important;
    text-align: center !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    margin: 2px 0 !important;
}

/* Format the custom divider line between size and height */
html body .wapf .custom-swatch-btn > span[style*="border-bottom"] {
    width: 20px !important;
    height: 1px !important;
    min-height: 1px !important;
    background: #8D7B71 !important;
    border: none !important;
    margin: 4px auto !important;
}

/* Price tag formatting */
html body .wapf .custom-swatch-btn .swatch-price-hint {
    font-size: 11px !important;
    color: #666 !important;
    margin-top: 2px !important;
}

/* 5. Active & Hover States */
html body .wapf .custom-swatch-wrapper > .custom-swatch-btn.is-text-swatch:hover,
html body .wapf .custom-swatch-wrapper > .custom-swatch-btn.is-text-swatch:focus,
html body .wapf .custom-swatch-wrapper > .custom-swatch-btn.is-text-swatch:active,
html body .wapf .custom-swatch-wrapper > .custom-swatch-btn.is-text-swatch.active {
    background-color: #FAF8F3 !important;
    border-color: #2C3E50 !important;
    border-width: 2px !important;
}

/* 6. Mobile Responsiveness */
@media (max-width: 480px) {
    html body .wapf .custom-swatch-wrapper {
        gap: 8px !important;
    }
    
    /* Slightly smaller fixed uniform size for mobile phones */
    html body .wapf .custom-swatch-btn {
        width: 65px !important;
        min-width: 65px !important;
        max-width: 65px !important;

        height: 75px !important;
        min-height: 75px !important;
        max-height: 75px !important;
        
        padding: 4px !important;
    }

    html body .wapf .custom-swatch-btn > span {
        transform: scale(0.95); 
    }

    html body .wapf .custom-swatch-btn .swatch-price-hint {
        font-size: 10px !important;
    }
}
/* ============================================
   Elementor Menu Cart — Modern Layout
   (no colors / fonts / font-sizes added)
   ============================================ */

/* --- Main container --- */
.elementor-menu-cart__main {
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- Close button --- */
.elementor-menu-cart__close-button {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

.elementor-menu-cart__close-button:hover {
    transform: rotate(90deg);
}

/* --- Scrollable content area --- */
.widget_shopping_cart_content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 24px 20px;
    box-sizing: border-box;
    gap: 16px;
}

/* --- Product list wrapper --- */
.elementor-menu-cart__products {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    margin-right: -6px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.elementor-menu-cart__products::-webkit-scrollbar {
    width: 6px;
}

.elementor-menu-cart__products::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.15);
}

.elementor-menu-cart__products::-webkit-scrollbar-track {
    background: transparent;
}

/* --- Individual cart item --- */
.elementor-menu-cart__product {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
        "image name remove"
        "image price remove";
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: opacity 0.25s ease;
}

.elementor-menu-cart__product:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* --- Product image --- */
.elementor-menu-cart__product-image {
    grid-area: image;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.elementor-menu-cart__product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.elementor-menu-cart__product:hover .elementor-menu-cart__product-image {
    transform: scale(1.03);
}

/* --- Product name --- */
.elementor-menu-cart__product-name {
    grid-area: name;
    align-self: end;
    line-height: 1.4;
    padding-right: 6px;
}

.elementor-menu-cart__product-name a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.elementor-menu-cart__product-name a:hover {
    opacity: 0.7;
}

/* --- Product price --- */
.elementor-menu-cart__product-price {
    grid-area: price;
    align-self: start;
    display: flex;
    align-items: center;
}

.elementor-menu-cart__product-price .quantity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- Remove button --- */
.elementor-menu-cart__product-remove {
    grid-area: remove;
    align-self: center;
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.elementor-menu-cart__product-remove a {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0; /* hide default "×" text, keep icon via ::before */
}

.elementor-menu-cart__product-remove a::before {
    content: "×";
    font-size: 18px;
    line-height: 1;
    display: block;
}

.elementor-menu-cart__product-remove a:last-child {
    display: none; /* hide duplicate remove button */
}

.elementor-menu-cart__product-remove:hover {
    transform: scale(1.08);
}

/* --- Subtotal row --- */
.elementor-menu-cart__subtotal {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.elementor-menu-cart__subtotal strong {
    font-weight: 600;
}

/* --- Footer buttons --- */
.elementor-menu-cart__footer-buttons {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 4px;
}

.elementor-menu-cart__footer-buttons .elementor-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.elementor-menu-cart__footer-buttons .elementor-button:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.elementor-menu-cart__footer-buttons .elementor-button:active {
    transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .elementor-menu-cart__main {
        width: 100vw;
    }

    .widget_shopping_cart_content {
        padding: 20px 16px;
    }

    .elementor-menu-cart__product {
        grid-template-columns: 64px 1fr auto;
        column-gap: 12px;
    }

    .elementor-menu-cart__product-image {
        width: 64px;
        height: 64px;
    }

    .elementor-menu-cart__footer-buttons {
        grid-template-columns: 1fr;
    }
}
.dgwt-wcas-open-pirx .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact .dgwt-wcas-sf-wrapp, .dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-om-bar button.dgwt-wcas-om-return {
    background: #fff !important;
    border: none !important;
}