/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */


/* Fix Arabic Translations Fonts & Layout via body classes */
body.translatepress-ar *[data-no-translation],
body.translatepress-ar *[data-trp-gettext],
body.translatepress-ar .ct-woo-card-extra span,
body.translatepress-ar .ct-onsale,
body.translatepress-ar .onsale,
body.translatepress-ar .button,
body.translatepress-ar .add_to_cart_button,
body.translatepress-ar .woocommerce-result-count,
body.translatepress-ar form.woocommerce-ordering select {
    font-family: 'Cairo', sans-serif !important;
}

/* Align sorting dropdown and text properly to the right */
body.translatepress-ar .ct-shop-sorting {
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 30px !important;
    width: 100% !important;
}

body.translatepress-ar .woocommerce-ordering,
body.translatepress-ar .woocommerce-result-count,
body.translatepress-ar .ct-custom-select {
    float: none !important;
    margin: 0 !important;
}

/* Adjust Dropdown internal padding to look clean */
body.translatepress-ar form.woocommerce-ordering select {
    padding-right: 15px !important;
    padding-left: 35px !important;
}

/* Wishlist Page: Hide shopping bag icon inside TRY A SAMPLE FIRST box buttons only */
[class*="wish"] .devaura-sample-btn svg,
[id*="wish"] .devaura-sample-btn svg,
.woocommerce-account .devaura-sample-btn svg,
.page-name-wishlist .devaura-sample-btn svg,
.wishlist .devaura-sample-btn svg,
.wishlist-page .devaura-sample-btn svg,
.page-slug-wishlist .devaura-sample-btn svg,
.wishlist_table .devaura-sample-btn svg,
.blocksy-wishlist-table .devaura-sample-btn svg {
    display: none !important;
}

/* Blocksy Header: Position logged-out Login text under the person icon */
/* Ultra-high specificity to override Blocksy built-in header account styles and dynamic layouts */
header .ct-header-account[data-id="account"][data-state="out"] a.ct-account-item[data-label],
.ct-header-account[data-id="account"][data-state="out"]>a.ct-account-item,
.ct-header-account[data-state="out"] .ct-account-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    text-align: center !important;
    height: auto !important;
    min-height: unset !important;
    position: relative !important;
    transform: none !important;
}

/* Ensure the SVG icon is always positioned statically at the top */
header .ct-header-account[data-id="account"][data-state="out"] a.ct-account-item svg.ct-icon,
.ct-header-account[data-id="account"][data-state="out"] .ct-account-item svg.ct-icon,
.ct-header-account[data-state="out"] .ct-account-item .ct-icon {
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
    position: static !important;
    transform: none !important;
    order: 1 !important;
    display: block !important;
}

/* Force the label text below the icon, fully visible and static */
header .ct-header-account[data-id="account"][data-state="out"] a.ct-account-item .ct-label,
.ct-header-account[data-id="account"][data-state="out"] .ct-account-item .ct-label,
.ct-header-account[data-state="out"] .ct-account-item .ct-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
    position: static !important;
    transform: none !important;
    order: 2 !important;
    white-space: nowrap !important;
}

/* Override the data-label="right" and data-label="left" positioning blocksy uses */
.ct-header-account[data-state="out"] a.ct-account-item[data-label="right"],
.ct-header-account[data-state="out"] a.ct-account-item[data-label="left"] {
    flex-direction: column !important;
    gap: 4px !important;
}

/* Override Blocksy's ct-hidden-sm that hides the label on mobile */
.ct-header-account[data-state="out"] .ct-account-item .ct-label.ct-hidden-sm {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* ── AIT Premium Wishlist Badge Styling ── */
.ct-header-wishlist .ct-icon-container {
    position: relative;
}

.ct-dynamic-count-wishlist {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: #b48c50 !important;
    /* Premium AIT gold/brown */
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    z-index: 10 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

/* RTL positioning adjustments for Arabic version */
body.translatepress-ar .ct-dynamic-count-wishlist {
    right: auto !important;
    left: -8px !important;
}

/* =========================================================================
   CUSTOMIZABLE: OUT-OF-STOCK BADGE COLORS
   =========================================================================
   You can change the background, border, and text colors of the "Out of Stock"
   tags globally here. Simply update the hex values below:
   ========================================================================= */

/* 1. Global / Catalog / Product Card "Out of Stock" Badges */
.devaura-samples-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.08) !important;
    /* Soft Red background */
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    /* Red border */
    color: #d50000 !important;
    /* Red text */
}

/* 2. Pulsing indicator dot on Global Out of Stock Badges */
.devaura-samples-badge.out-of-stock .devaura-badge-pulse {
    background: #d50000 !important;
    /* Pulse dot color */
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4) !important;
}

/* 3. Wishlist / Comparison Page Out of Stock Badges */
.devaura-stock-badge.out-of-stock {
    background: rgba(220, 53, 69, 0.08) !important;
    /* Soft Red background */
    color: #d50000 !important;
    /* Red text */
}

/* 4. Indicator dot on Wishlist Out of Stock Badges */
.devaura-stock-badge.out-of-stock .devaura-stock-dot {
    background: #d50000 !important;
    /* Dot color */
}

/* Hide filter button on PC (desktop) version of the Shop page, categories, and other pages, 
   but ensure it remains visible on all search results and mobile devices */
@media (min-width: 992px) {
    body:not(.search):not(.search-results) .ct-toggle-filter-panel {
        display: none !important;
    }
}

/* ── Premium Match for Single Product Quantity & Add to Cart Height ── */
.single-product div.quantity {
    display: inline-flex !important;
    align-items: center !important;
    height: 52px !important; /* Perfect match for Blocksy's button height */
    border: 1px solid rgba(180, 140, 80, 0.2) !important; /* Elegant gold tint border */
    border-radius: 50px !important; /* Match pill shape of Add to Cart */
    padding: 0 12px !important;
    background: #FCFBF9 !important; /* Matches premium cream color theme */
    box-sizing: border-box !important;
    width: 140px !important; /* Elegant width */
    justify-content: space-between !important;
    box-shadow: 0 2px 8px rgba(26, 20, 8, 0.02) !important;
    margin-right: 15px !important; /* Space between it and Add to Cart button */
}

/* Style the buttons inside the quantity container */
.single-product div.quantity button.minus,
.single-product div.quantity button.plus,
.single-product div.quantity span.minus,
.single-product div.quantity span.plus,
.single-product div.quantity .ct-minus,
.single-product div.quantity .ct-plus {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    color: #1a1408 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-product div.quantity button.minus:hover,
.single-product div.quantity button.plus:hover,
.single-product div.quantity span.minus:hover,
.single-product div.quantity span.plus:hover,
.single-product div.quantity .ct-minus:hover,
.single-product div.quantity .ct-plus:hover {
    background: #F5F2EC !important;
    color: #b48c50 !important;
}

/* Style the text input field inside */
.single-product div.quantity input.qty,
.single-product div.quantity input[type="number"] {
    width: 44px !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    color: #1a1408 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important; /* Hide spin arrows */
}

/* Hide webkit spin buttons */
.single-product div.quantity input.qty::-webkit-outer-spin-button,
.single-product div.quantity input.qty::-webkit-inner-spin-button,
.single-product div.quantity input[type="number"]::-webkit-outer-spin-button,
.single-product div.quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}


/* =========================================================================
   AIT STORE — GLOBAL CARD STYLING & PRICE CLEANUP (RESTORE STANDARDS)
   ========================================================================= */

/* Force-show EGP on desktop / laptop / tablet (belt-and-suspenders) */
@media (min-width: 768px) {
    .woocommerce-Price-currencySymbol {
        display: inline !important;
    }
}

/* Hide EGP on mobile only */
@media (max-width: 767px) {
    .woocommerce-Price-currencySymbol {
        display: none !important;
    }

    /* Hide the "Login" text label under the profile/account icon on mobile */
    [data-id="account"] .ct-label,
    .ct-header-account .ct-label {
        display: none !important;
    }
}