/* ===== BARAA HOME v4.0 - Shopstar + CRO Optimized ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* ── Global ── */
body { font-family: 'Cairo', sans-serif !important; direction: rtl; }
* { font-style: normal !important; }
em, i, cite, dfn, var { font-style: normal !important; }
* { box-sizing: border-box; }

/* ── HIDE: login, cart, account, "Theme by" ── */
.header-cart, .account-link, .woocommerce-MyAccount-navigation,
.site-footer .bottom-bar, .woocommerce-breadcrumb,
.woocommerce span.onsale, .woocommerce-js span.onsale,
.woocommerce-result-count, .woocommerce-ordering,
nav.woocommerce-pagination { display: none !important; }

/* ── Announcement Bar ── */
.baraa-announcement-bar {
    background: linear-gradient(90deg, #e44d26, #d4381a);
    color: #fff; padding: 10px 0; overflow: hidden;
    font-family: 'Cairo', sans-serif; font-size: 13px;
    font-weight: 600; position: relative; z-index: 99999;
    letter-spacing: 0.3px; text-align: center;
}
.baraa-announcement-track {
    display: inline-block;
    white-space: nowrap;
}
.baraa-announcement-sep { margin: 0 20px; opacity: .5; }

/* ── Header RTL + Clean ── */
.site-header { direction: rtl; border-bottom: 1px solid #eee; }
.site-header .container { direction: rtl; }
.site-branding, #site-branding { text-align: center !important; }
.custom-logo-link { display: inline-block !important; }
.custom-logo { max-height: 55px; width: auto !important; }
/* Hide text title/description when logo exists */
.has-custom-logo .site-title, .has-custom-logo .site-description,
.has-custom-logo #site-title, .has-custom-logo #site-description,
.custom-logo-link + #site-title, .custom-logo-link ~ #site-description { display: none !important; }
.site-title { font-family: 'Cairo', sans-serif !important; font-weight: 800; }

/* ── Navigation RTL ── */
.main-navigation { direction: rtl; font-family: 'Cairo', sans-serif; }
.main-navigation ul { direction: rtl; }
.main-navigation li a { font-weight: 600; font-size: 14px; }

/* ── Slider ── */
.slider-container { border-radius: 0; }
.slider-container .slide { position: relative; }
.slider-container .slide-content { direction: rtl; text-align: center; font-family: 'Cairo', sans-serif; }

/* ── SHOP PAGE: Product Grid ── */
.woocommerce ul.products,
.woocommerce ul.products[class*=columns-],
.woocommerce-page ul.products[class*=columns-] {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 !important;
    margin: 0 !important;
}
/* Kill WC smallscreen float layout globally */
.woocommerce ul.products[class*=columns-] li.product,
.woocommerce-page ul.products[class*=columns-] li.product,
.woocommerce ul.products[class*=columns-] li.product:nth-child(2n),
.woocommerce-page ul.products[class*=columns-] li.product:nth-child(2n),
.woocommerce ul.products li.first,
.woocommerce-page ul.products li.first {
    float: none !important;
    clear: none !important;
    width: 100% !important;
    margin: 0 !important;
}
/* Full width shop - no sidebar */
.woocommerce .content-area,
.woocommerce .site-main,
.woocommerce-page .content-area { width: 100% !important; float: none !important; }
.woocommerce .widget-area { display: none !important; }

/* Product Card */
.woocommerce ul.products li.product {
    text-align: center !important; position: relative;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    background: #fff; padding-bottom: 5px;
    margin: 0 !important; width: 100% !important;
    float: none !important;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

/* Product Image in Card */
.woocommerce ul.products li.product a img {
    border-radius: 12px 12px 0 0;
    width: 100% !important; height: 250px;
    object-fit: cover;
    display: block;
}

/* Product Title in Card */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Cairo', sans-serif !important;
    font-size: 14px !important; font-weight: 700;
    padding: 10px 10px 4px !important;
    line-height: 1.5; min-height: 42px;
    color: #333;
}

/* Price in Card */
.woocommerce ul.products li.product .price {
    font-family: 'Cairo', sans-serif !important;
    padding: 0 10px; margin-bottom: 5px;
}
.woocommerce ul.products li.product .price ins .woocommerce-Price-amount,
.woocommerce ul.products li.product .price > .woocommerce-Price-amount {
    color: #16a34a !important; font-weight: 800 !important; font-size: 16px;
}
.woocommerce ul.products li.product .price del .woocommerce-Price-amount {
    color: #999 !important; font-size: 13px;
}
.woocommerce ul.products li.product .price del { opacity: 1 !important; }

/* Hide default WC buttons */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product a.add_to_cart_button { display: none !important; }

/* Order Now Button on Card */
.baraa-card-btns { padding: 5px 12px 12px; }
.baraa-card-order-btn {
    display: block; width: 100%;
    padding: 10px 16px; border-radius: 8px;
    font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 700;
    text-decoration: none; text-align: center;
    background: #e44d26; color: #fff !important;
    transition: background .2s;
}
.baraa-card-order-btn:hover { background: #c23b1e; color: #fff !important; }

/* Wishlist Heart on Card */
.baraa-loop-wishlist {
    position: absolute; top: 10px; left: 10px; right: auto; z-index: 5;
    background: rgba(255,255,255,.95); border-radius: 50%;
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.12);
    font-size: 16px; color: #e44d26; transition: transform .2s;
}
.baraa-loop-wishlist:hover { transform: scale(1.15); }

/* ── SINGLE PRODUCT PAGE ── */
.woocommerce div.product { flex-wrap: wrap !important; direction: rtl; }
.baraa-breadcrumb-wrap { width: 100% !important; overflow: hidden; font-size: 13px; color: #888; margin-bottom: 10px; }
.baraa-breadcrumb-wrap a { color: #e44d26; text-decoration: none; }

/* Product Gallery */
.woocommerce-product-gallery { position: relative; }
.baraa-wishlist-btn {
    position: absolute; top: 12px; right: 12px; z-index: 10;
    background: #fff; border-radius: 50%; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: all .2s;
}
.baraa-wishlist-btn:hover { transform: scale(1.1); }
.baraa-heart { font-size: 22px; color: #e44d26; }

/* Product Title & Price */
.woocommerce div.product .product_title {
    font-family: 'Cairo', sans-serif !important; font-weight: 800;
    font-size: 22px; text-align: center; color: #222;
}
.woocommerce div.product .price { text-align: center; margin: 10px 0; }
.woocommerce div.product p.price ins, .woocommerce div.product span.price ins,
.woocommerce div.product p.price > .woocommerce-Price-amount,
.woocommerce div.product span.price > .woocommerce-Price-amount {
    color: #16a34a !important; font-weight: 800 !important; font-size: 24px;
    text-decoration: none !important;
}
.woocommerce div.product p.price del, .woocommerce div.product span.price del {
    color: #999 !important; opacity: 1 !important; font-size: 16px;
}
.woocommerce div.product p.price del .woocommerce-Price-amount {
    text-decoration: line-through !important;
}

/* Cart Form */
.woocommerce div.product form.cart {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;
    text-align: center;
}
.summary.entry-summary { text-align: center; }

/* Quantity */
.quantity { display: flex; align-items: center; border: 2px solid #e0e0e0; border-radius: 8px; overflow: hidden; width: fit-content; }
.quantity .qty {
    width: 50px; text-align: center; border: none !important;
    font-size: 16px; font-family: 'Cairo', sans-serif; -moz-appearance: textfield; padding: 8px 0;
}
.quantity .qty::-webkit-outer-spin-button, .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; }
.baraa-qty-btn {
    background: #f5f5f5; border: none; width: 32px; height: 44px;
    font-size: 16px; cursor: pointer; color: #555;
    display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.baraa-qty-btn:hover { background: #e44d26; color: #fff; }

/* Add to Cart Button */
.woocommerce div.product form.cart .button {
    background: #333 !important; color: #fff !important;
    border-radius: 8px !important; padding: 12px 28px !important;
    font-family: 'Cairo', sans-serif !important; font-weight: 700 !important;
    font-size: 15px !important; border: none !important;
}
.baraa-order-now-btn {
    background: #e44d26; color: #fff; border: none; border-radius: 8px;
    padding: 12px 32px; font-size: 15px; font-family: 'Cairo', sans-serif;
    font-weight: 700; cursor: pointer; transition: background .2s;
}
.baraa-order-now-btn:hover { background: #c23b1e; }

/* Description tab */
.woocommerce div.product .woocommerce-tabs { direction: rtl; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-family: 'Cairo', sans-serif; }

/* Variation Swatches */
.woocommerce div.product .variations { direction: rtl; }
.woocommerce div.product .variations td.label label { font-family: 'Cairo', sans-serif; font-weight: 700; }
.wvs-term {
    border: 2px solid #ddd; border-radius: 8px; padding: 8px 16px; font-size: 13px;
    font-family: 'Cairo', sans-serif; cursor: pointer; transition: all .2s; background: #fff;
}
.wvs-term:hover, .wvs-term.selected { border-color: #e44d26; background: #e44d26; color: #fff; }

/* ── ORDER FORM ── */
.baraa-order-section {
    background: #fff; border: 2px solid #e44d26; border-radius: 16px; padding: 30px;
    margin: 30px auto; direction: rtl; box-shadow: 0 8px 30px rgba(228,77,38,.08);
    max-width: 650px;
}
.baraa-form-title {
    color: #e44d26; font-size: 24px; font-weight: 800; margin: 0 0 20px;
    text-align: center; border-bottom: 2px solid #f5f5f5; padding-bottom: 15px;
}
.baraa-order-product-summary {
    display: flex; gap: 15px; align-items: center;
    background: #fafafa; border-radius: 12px; padding: 14px; margin-bottom: 20px;
    flex-direction: row-reverse;
}
.baraa-order-product-summary img { width: 65px; height: 65px; object-fit: cover; border-radius: 10px; }
.baraa-order-product-summary strong { font-size: 15px; }
.baraa-order-price { color: #16a34a; font-weight: 700; font-size: 16px; margin-top: 4px; }

.baraa-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.baraa-form-group { display: flex; flex-direction: column; gap: 6px; }
.baraa-form-group.full { grid-column: 1 / -1; }
.baraa-form-group label { font-weight: 700; font-size: 14px; color: #333; }
.baraa-form-group .req { color: #e44d26; }
.baraa-form-group input, .baraa-form-group select, .baraa-form-group textarea {
    border: 2px solid #e0e0e0; border-radius: 10px; padding: 12px 14px;
    font-family: 'Cairo', sans-serif; font-size: 14px; direction: rtl; text-align: right;
    transition: border-color .2s, box-shadow .2s; width: 100%;
}
.baraa-form-group input:focus, .baraa-form-group select:focus, .baraa-form-group textarea:focus {
    outline: none; border-color: #e44d26; box-shadow: 0 0 0 3px rgba(228,77,38,.1);
}

/* Totals */
.baraa-order-totals {
    background: #f9fafb; border-radius: 12px; padding: 16px 20px; margin: 20px 0;
}
.baraa-total-row {
    display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #555;
    border-bottom: 1px solid #eee;
}
.baraa-total-row:last-child { border-bottom: none; }
.baraa-grand-total {
    font-size: 20px !important; font-weight: 800 !important; color: #e44d26 !important;
    margin-top: 5px; padding-top: 10px;
}

/* Messages */
.baraa-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: 10px; padding: 14px; margin: 12px 0; text-align: center; font-weight: 600; }
.baraa-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; border-radius: 10px; padding: 18px; margin: 12px 0; text-align: center; font-weight: 700; font-size: 17px; }

/* Submit */
.baraa-submit-btn {
    width: 100%; background: #e44d26; color: #fff; border: none; border-radius: 12px;
    padding: 16px; font-size: 18px; font-weight: 800; font-family: 'Cairo', sans-serif;
    cursor: pointer; transition: all .2s; margin-top: 5px;
    box-shadow: 0 4px 14px rgba(228,77,38,.3);
}
.baraa-submit-btn:hover { background: #c23b1e; box-shadow: 0 6px 20px rgba(228,77,38,.4); }
.baraa-submit-btn:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }

/* Trust Badges */
.baraa-trust-badges {
    display: flex; justify-content: center; gap: 20px; margin-top: 15px;
    flex-wrap: wrap;
}
.baraa-trust-badges span {
    font-size: 12px; color: #666; font-weight: 600;
    background: #f5f5f5; padding: 6px 12px; border-radius: 20px;
}

/* ── Footer ── */
.baraa-footer-custom {
    background: #1a1a1a; color: #ccc; font-family: 'Cairo', sans-serif;
    direction: rtl; padding: 35px 20px 20px; text-align: center;
}
.baraa-footer-social { display: flex; justify-content: center; gap: 18px; margin-bottom: 20px; }
.baraa-footer-social a { color: #aaa; transition: color .2s; display: flex; }
.baraa-footer-social a:hover { color: #e44d26; }
.baraa-footer-links {
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
    margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #333;
}
.baraa-footer-links a { color: #aaa; text-decoration: none; font-size: 13px; transition: color .2s; }
.baraa-footer-links a:hover { color: #e44d26; }
.baraa-footer-copy { font-size: 12px; color: #666; }

/* ── MOBILE ── */
@media (max-width: 991px) {
    .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; gap: 12px; }
}
@media (max-width: 768px) {
    /* Kill boxed layout constraints */
    .boxed-layout #page, .boxed-layout .wrap, .wrap {
        width: 100% !important; max-width: 100% !important;
    }
    /* Force grid - override WC smallscreen float layout */
    .woocommerce ul.products,
    .woocommerce ul.products[class*=columns-],
    .woocommerce-page ul.products[class*=columns-] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    /* Kill ALL float/clear on products */
    .woocommerce ul.products li.product,
    .woocommerce ul.products[class*=columns-] li.product,
    .woocommerce-page ul.products[class*=columns-] li.product,
    .woocommerce ul.products[class*=columns-] li.product:nth-child(2n),
    .woocommerce-page ul.products[class*=columns-] li.product:nth-child(2n),
    .woocommerce ul.products li.first,
    .woocommerce-page ul.products li.first {
        float: none !important; clear: none !important;
        width: 100% !important; margin: 0 !important;
    }
    .woocommerce ul.products li.product a img { height: 180px; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; min-height: 36px; padding: 8px 8px 2px !important; }

    .baraa-form-grid { grid-template-columns: 1fr; }
    .baraa-order-section { padding: 20px 15px; margin: 15px 10px; }
    .baraa-form-title { font-size: 20px; }

    .woocommerce div.product form.cart .button, .baraa-order-now-btn {
        width: 100%; margin: 5px 0;
    }
    .woocommerce div.product form.cart { flex-direction: column; }
    .woocommerce div.product .product_title { font-size: 18px; }

    .baraa-footer-links { gap: 12px; }
    .baraa-trust-badges { gap: 8px; }
    .baraa-trust-badges span { font-size: 11px; padding: 5px 10px; }

    .baraa-announcement-bar { font-size: 12px; padding: 8px 0; }

    /* Product page full width on mobile */
    .woocommerce div.product div.images,
    .woocommerce div.product div.summary { width: 100% !important; float: none !important; }
}

@media (max-width: 480px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .woocommerce ul.products li.product a img { height: 150px; }
    .baraa-card-order-btn { font-size: 13px; padding: 8px 12px; }
    .woocommerce ul.products li.product .price { font-size: 14px; }
}
