/*
 Theme Name: Astra Child - Tibat
 Template: astra
 Description: Custom child theme for Tibat store
 Version: 2.0
 Text Domain: astra-child
*/
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

/* ===== RTL & Arabic Base ===== */
body {
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* ===== Top Announcement Bar ===== */
.tibat-marquee {
    background: #e8740c;
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
.tibat-marquee .marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== Header - Match tibatx.com ===== */
.ast-primary-header-bar {
    border-bottom: 1px solid #eee;
}
/* Logo size control */
.site-branding img,
.ast-site-identity img,
.custom-logo {
    max-height: 40px !important;
    width: auto !important;
}
.ast-site-identity {
    max-width: 120px;
}
/* Hide site title text next to logo */
.site-title,
.site-description,
.ast-site-title-wrap {
    display: none !important;
}

/* Navigation styling */
.main-header-menu .menu-item > a,
.ast-header-sections-navigation .menu-item > a {
    font-size: 14px;
    font-weight: 600;
    color: #333 !important;
}
.main-header-menu .menu-item > a:hover {
    color: #e8740c !important;
}

/* ===== Sale Badge - Hidden ===== */
.woocommerce span.onsale {
    display: none !important;
}

/* ===== Product Grid ===== */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;
}
@media (max-width: 992px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 544px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

.woocommerce ul.products li.product {
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}
.woocommerce ul.products li.product a img {
    border-radius: 8px 8px 0 0;
    width: 100%;
    height: 250px;
    object-fit: cover;
}
@media (max-width: 544px) {
    .woocommerce ul.products li.product a img {
        height: 200px;
    }
}

/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600;
    color: #333;
    padding: 8px 5px 2px !important;
    margin: 0;
    line-height: 1.4;
}

/* ===== Price Colors ===== */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    text-align: center !important;
    font-size: 15px !important;
    direction: rtl;
}
.woocommerce div.product p.price ins,
.woocommerce ul.products li.product .price ins,
.woocommerce div.product span.price ins {
    color: #27ae60 !important;
    font-weight: 700;
    text-decoration: none !important;
}
.woocommerce div.product p.price del,
.woocommerce ul.products li.product .price del,
.woocommerce div.product span.price del {
    color: #999 !important;
    opacity: 0.8;
    text-decoration: line-through !important;
    font-size: 13px !important;
}

/* ===== Quantity Selector - Small arrows ===== */
.woocommerce .quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.woocommerce .quantity .qty {
    width: 40px !important;
    height: 32px !important;
    text-align: center;
    font-size: 14px !important;
    border: 1px solid #ddd;
    -moz-appearance: textfield;
    padding: 0;
}
.woocommerce .quantity .qty::-webkit-inner-spin-button,
.woocommerce .quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-btn {
    width: 24px;
    height: 16px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 0;
    line-height: 1;
}
.qty-btn:hover { background: #e0e0e0; }
.qty-arrows {
    display: flex;
    flex-direction: column;
}

/* ===== Product Buttons ===== */
.tibat-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
    padding: 0 8px 12px;
}
.tibat-btn-order {
    background: #e8740c !important;
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}
.tibat-btn-order:hover { background: #d06600 !important; color: #fff !important; }
.tibat-btn-cart {
    background: transparent !important;
    color: #e8740c !important;
    padding: 6px 14px !important;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e8740c !important;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}
.tibat-btn-cart:hover { background: #e8740c !important; color: #fff !important; }

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

/* ===== Page Title ===== */
.woocommerce-products-header__title,
.page-title {
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 700;
    color: #333;
}

/* ===== Sorting Dropdown ===== */
.woocommerce-ordering {
    float: left !important;
}
.woocommerce-ordering select {
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 13px;
}

/* ===== Footer ===== */
.tibat-footer-info {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}
.tibat-footer-info a {
    margin: 0 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.tibat-footer-info a:hover { color: #e8740c; }
.tibat-copyright {
    background: #2c3e50;
    color: #fff;
    padding: 12px;
    text-align: center;
    font-size: 13px;
}

/* Hide Astra footer credit */
.ast-small-footer,
.ast-footer-overlay,
a[href*="wpastra.com"],
.ast-footer-copyright,
.site-below-footer-wrap {
    display: none !important;
}

/* ===== Hide pagination for infinite scroll ===== */
.woocommerce-pagination {
    display: none !important;
}

/* ===== Results count ===== */
.woocommerce-result-count {
    display: none !important;
}

/* ===== Messenger chat button ===== */
.tibat-messenger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    width: 50px;
    height: 50px;
    background: #0084ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s;
}
.tibat-messenger:hover {
    transform: scale(1.1);
}
.tibat-messenger svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* ===== Breadcrumb hide ===== */
.woocommerce-breadcrumb {
    display: none !important;
}

/* ===== WooCommerce columns override ===== */
.ast-woocommerce-container {
    max-width: 1300px !important;
}
