/* Brand Palette */
:root {
    --theme-color: #21535d; /* Dark Blue/Teal */
    --primary: #21535d;
    --hov-primary: #378893; /* Teal */
    --soft-primary: #dae2b7; /* Pale Green */
    --secondary: #b3c187; /* Light Green */
    --gray-light: #e2e2e2; /* Light Gray */
    --bg-body: #fbf7f3; /* Off White */

    /* Fonts - Arabic Specific */
    --font-primary: "Somar", sans-serif;
    --font-display: "Somar", sans-serif; /* Arabic Headings also use Somar */
    
    /* Typographic Scale */
    --fs-base: 16px;
    --fs-h1: 2.5rem;
    --fs-h2: 2rem;
    --fs-h3: 1.75rem;
    --fs-h4: 1.5rem;
    --fs-h5: 1.25rem;
    --fs-h6: 1rem;

    /* Font Weights */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-bold: 700;
    --fw-heading: 700; /* Bold for Arabic Headings */
    
    /* Color Overrides */
    --dark: #21535D;
    --gray-dark: #21535D;
}

/* Local Font Definitions */
@font-face {
    font-family: "Somar";
    src: url("../../fonts/arabic font/alfont_com_SomarGX.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Global Typography */
html {
    font-size: var(--fs-base);
}

body {
    font-family: var(--font-primary) !important;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: var(--fw-normal);
    background-color: var(--bg-body);
}

/* Headings (Arabic) */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { 
    font-family: var(--font-display) !important;
    font-size: initial; 
    font-weight: var(--fw-heading) !important;
    line-height: 1.3;
}

/* Specific Sizes */
h1, .h1 { font-size: var(--fs-h1) !important; }
h2, .h2 { font-size: var(--fs-h2) !important; }
h3, .h3 { font-size: var(--fs-h3) !important; }
h4, .h4 { font-size: var(--fs-h4) !important; }
h5, .h5 { font-size: var(--fs-h5) !important; }
h6, .h6 { font-size: var(--fs-h6) !important; }

/* Color Application */
body, p, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, li, span, a, .text-dark, .text-muted, .aiz-side-nav-list a {
    color: var(--primary);
}

a:hover {
    color: var(--hov-primary);
}

/* Force Arabic Font on EVERYTHING */
html[lang="ar"] *,
body[dir="rtl"] *,
html[lang="ar"] .main-menu *,
body[dir="rtl"] .main-menu *,
html[lang="ar"] .navbar *,
body[dir="rtl"] .navbar *,
html[lang="ar"] a,
body[dir="rtl"] a,
html[lang="ar"] li,
body[dir="rtl"] li,
html[lang="ar"] button,
body[dir="rtl"] button,
html[lang="ar"] input,
body[dir="rtl"] input,
html[lang="ar"] textarea,
body[dir="rtl"] textarea,
html[lang="ar"] .btn,
body[dir="rtl"] .btn {
    font-family: "Somar", sans-serif !important;
}

.top-header, .header-2 .top-header {
    background-color: var(--theme-color) !important;
    color: #fff !important;
}

.aiz-p-hov-icon a {
    color: var(--primary) !important;
}

.modal-backdrop {
    background-color: var(--theme-color) !important;
    opacity: 0.8 !important;
}

.aiz-side-nav {
    background-color: #fff;
}
.aiz-side-nav .aiz-side-nav-list a {
    color: var(--primary) !important;
}

/* RTL Layout Main Nav Header Overrides */
html[dir="rtl"] .main-nav-center {
    display: flex;
    justify-content: center;
}

html[dir="rtl"] .main-menu .menu-right {
    float: left !important;
}

html[dir="rtl"] .main-menu .menu-left {
    float: right !important;
}

html[dir="rtl"] .main-menu .menu-left .navbar {
    display: inline-block;
    padding: 35px 0 35px 25px;
}

html[dir="rtl"] .main-nav-center ul#main-menu {
    display: flex;
    flex-direction: row-reverse;
}

html[dir="rtl"] .main-nav-center ul#main-menu li {
    float: right;
}

/* Banner position overrides */
html[dir="rtl"] .banner-padding .col-md-8 .contain-banner {
    justify-content: flex-end;
}

/* Service Section Icons */
.service-block1 svg path {
    fill: var(--secondary) !important;
}

/* Solid Buttons */
.btn-solid {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    /* color: var(--primary) !important; */
    color: #fff !important;
    background-image: none !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease !important;
}

.btn-solid:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

/* Title Line */
.title4 .line,
.title4 .line:after, 
.title4 .line:before,
.title4 .line span:after,
.title4 .line span:before {
    background-color: var(--secondary) !important;
}

.product-page-details .product-buttons .btn {
    padding: 13px 33px !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Trending Products / Tab Section Styles */
.theme-tab .tabs {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.theme-tab .tabs li {
    margin: 0 15px;
}

.theme-tab .tabs li a {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    text-transform: capitalize;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.theme-tab .tabs li.current a,
.theme-tab .tabs li:hover a {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.product-tab {
    display: flex;
    flex-wrap: wrap;
}

.tab-box {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 10px;
}
/* Ribbon for discounted products */
.img-wrapper, .media {
    position: relative;
}

.basic-product .ribbon {
    position: absolute;
    left: -5px;
    top: -5px;
    z-index: 1;
    width: 75px;
    height: 75px;
    text-align: right;
    overflow: hidden;
    transition: 0.3s ease-in-out;
}
.basic-product .ribbon span {
    font-size: calc(9.6px + 0.125vw);
    font-weight: bold;
    color: rgb(238, 238, 238);
    text-transform: capitalize;
    text-align: center;
    line-height: calc(19px + 0.3125vw);
    transform: rotate(-45deg);
    width: 105px;
    display: block;
    position: absolute;
    top: 19px;
    left: -21px;
    background: var(--theme-color);
}
.ribbon span {
    position: absolute;
    display: block;
    width: 100px;
    padding: 2px 0;
    background-color: #ff883b; /* Orange color from image */
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(45deg);
    right: -20px;
    top: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.basic-product .ribbon {
    position: absolute;
    left: -5px;
    top: -5px;
    z-index: 1;
    width: 75px;
    height: 75px;
    text-align: right;
    overflow: hidden;
    transition: 0.3s ease-in-out;
}
.basic-product .ribbon span {
    font-size: calc(9.6px + 0.125vw);
    font-weight: bold;
    color: rgb(238, 238, 238);
    text-transform: capitalize;
    text-align: center;
    line-height: calc(19px + 0.3125vw);
    transform: rotate(-45deg);
    width: 105px;
    display: block;
    position: absolute;
    top: 19px;
    left: -21px;
    background: var(--theme-color);
}
[dir="ltr"] .ribbon {
    right: auto;
    left: 0;
}

[dir="ltr"] .ribbon span {
    right: auto;
    left: -20px;
    transform: rotate(-45deg);
}
@media (max-width: 991px) {
    .tab-box {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575px) {
    .tab-box {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.product-box2 {
    background: #fff;
    /* padding: 20px; */
    /* border: 1px solid #f1f5f4; */
    transition: 0.3s;
    height: 100%;
}

.product-box2:hover {
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.product-box2 .media {
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-box2 .media img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    transition: 0.5s;
}


.product-box2:hover .media img {
    transform: scale(1.1);
}

.product-box2 .media-body h6 {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary);
}

.product-box2 .media-body h4 {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 0;
}

.product-box2 .media-body .rating {
    margin-bottom: 5px;
}

.product-box2 .media-body .rating i {
    color: #ffa800;
    font-size: 14px;
}

/* Rating Input Design */
.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 32px;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    color: #e6e6e6;
    transition: transform 0.2s ease;
    margin: 0 4px;
}

.rating-input label i.ri-star-fill {
    color: #febd69;
}

.rating-input label i.ri-star-line {
    color: #e6e6e6;
}

.rating-input label:active {
    transform: scale(1.2);
}

.rating-value {
    color: #febd69;
    background: rgba(254, 189, 105, 0.1);
    padding: 4px 14px;
    border-radius: 50px;
    margin-right: 15px;
    font-weight: 800;
    font-size: 18px;
    border: 1px solid rgba(254, 189, 105, 0.2);
}


/* Responsive Quantity Box */
.qty-section {
    /* max-width: 160px; */
    margin: 0 auto;
}

.qty-section .qty-box .input-group {
    flex-wrap: nowrap !important;
}

.qty-section .qty-box .input-group .btn {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    z-index: 0;
}

.qty-section .qty-box .input-group .form-control.input-number {
    min-width: 50px;
    border-left: 0;
    border-right: 0;
}

/* New Arrivals slider RTL - handled via JS re-initialization in index.blade.php */

/* Premium Responsive Product Buttons */
.product-buttons.w-100 {
    margin-top: 24px !important;
}

.product-buttons .d-flex {
    flex-wrap: wrap;
    gap: 12px !important;
}

.product-buttons .btn-solid {
    flex: 1 1 calc(50% - 6px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.product-buttons .btn-solid i {
    margin-left: 8px; /* RTL spacing */
    font-size: 18px;
}

.product-buttons .btn-solid.btn-animation {
    background-color: var(--theme-color);
    border: 1px solid var(--theme-color);
    color: #fff;
}

.product-buttons .btn-solid.btn-animation:hover {
    background-color: #fff;
    color: var(--theme-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.product-buttons .buy-button {
    background-color: #222;
    border: 1px solid #222;
    color: #fff;
}

.product-buttons .buy-button:hover {
    background-color: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.product-buttons .btn-secondary.out-of-stock {
    flex: 1 1 100%;
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 8px;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .product-buttons .btn-solid {
        flex: 1 1 100%;
        margin-bottom: 2px;
    }
}

/* Centering Slider Details on Mobile */
@media (max-width: 576px) {
    .main-home-slider .slider-contain {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0 20px !important;
    }
    .main-home-slider .slider-details {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .main-home-slider .slider-details h1, 
    .main-home-slider .slider-details h4, 
    .main-home-slider .slider-details p {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Menu Styling Refinement */
@media (min-width: 992px) {
    .pixelstrap a, .pixelstrap a:hover, .pixelstrap a:active {
        padding-right: 30px !important; /* Ultra-tight padding */
        padding-left: 5px !important;
    }
}

.rtl .pixelstrap a {
    font-size: 16px !important;
    white-space: nowrap !important;
    letter-spacing: -0.5px !important; /* Help fit Arabic text */
    font-weight: 500;
    line-height: 23px;
    text-decoration: none;
    text-transform: capitalize;
    /* padding-top: 42px;
    padding-bottom: 42px; */
}

/* #main-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
} */

.rtl .menu-right {
    width: auto !important;
    max-width: 75% !important; /* Give more space to menu */
}

.rtl .menu-left {
    max-width: 25% !important;
}

.pixelstrap a .sub-arrow {
    right: 130px !important;
    font-size: 20px !important;
}



/* Fix Slick Slider invisibility in RTL */
.rtl .slick-slider {
    direction: rtl !important;
}

.rtl .slick-list {
    direction: rtl !important;
}

.rtl .slick-track {
    direction: rtl !important;
}

.rtl .slick-slide {
    float: right !important;
}

/* Sidenav Layout Adjustments */
.sidenav .sidebar-back {
    padding: 8px 15px; /* Tighter padding */
    margin-bottom: 0 !important;
    border-bottom: 1px solid #f0f0f0;
    line-height: normal !important;
    display: flex;
    align-items: center;
}

.sidenav .sidebar-back i {
    font-size: 1.5rem;
}

.pixelstrap.sm-vertical {
    margin-top: 0 !important;
}

.pixelstrap.sm-vertical li {
    margin: 0 !important;
}

.pixelstrap.sm-vertical li a {
    padding: 10px 15px !important; /* Compact vertical padding */
    line-height: 1.2 !important;
}

.sidenav .sidebar-back {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

/* Fix for Hero Slider specifically */
.rtl .main-home-slider,
.rtl .main-home-slider .slick-list,
.rtl .main-home-slider .slick-track {
    direction: rtl !important;
}

.rtl .main-home-slider .slick-slide {
    float: right !important;
}
.pixelstrap.sm-vertical a .sub-arrow:before {
    content: "\f104"; /* left arrow */
}

/* Mobile Font Size Adjustments */
@media (max-width: 768px) {
    .main-home-slider .slider-details h1.slider-h1 {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin-top: 10px !important;
    }
    .main-home-slider .slider-details h4.slider-h4 {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }
    .collection-banner .contain-banner h2 {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }

    /* Product Details */
    .breadcrumb-section h2 {
        font-size: 24px !important;
    }
    .product-page-details .main-title {
        font-size: 24px !important;
    }
    .price-text h3 {
        font-size: 20px !important;
    }
}

@media (max-width: 576px) {
    .main-home-slider .slider-details h1.slider-h1 {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    .main-home-slider .slider-details h4.slider-h4 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    .main-home-slider .slider-details p.slider-p {
        font-size: 12px !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .main-home-slider .slider-details .btn-solid.slider-btn {
        padding: 8px 15px !important;
        font-size: 12px !important;
        margin-top: 0 !important;
    }

    .collection-banner .contain-banner h2 {
        font-size: 16px !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
    }
    .collection-banner .contain-banner h4 {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    .collection-banner .contain-banner .btn-solid {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }

    /* Product Details */
    .breadcrumb-section h2 {
        font-size: 20px !important;
    }
    .product-page-details .main-title {
        font-size: 20px !important;
    }
    .price-text h3 {
        font-size: 18px !important;
    }
    .price-text h3 del {
        font-size: 14px !important;
    }
    .product-page-details .accordion-button {
        font-size: 16px !important;
    }
    .product-page-details .sub-title {
        font-size: 16px !important;
    }
}
.tab-product .tab-content.nav-material p, .product-full-tab .tab-content.nav-material p {
    color: #777 !important;
}

.badge {
    color: var(--theme-color) !important;
}

/* FAQ Flat Design */
.faq-list .faq-item {
    margin-bottom: 25px;
}
.faq-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    border-radius: 4px;
}
.faq-q {
    background-color: var(--secondary);
    color: #333;
}
.faq-a {
    background-color: var(--primary);
    color: #ffffff;
}
.faq-question {
    font-weight: 700;
    color: var(--primary);
    padding-top: 5px;
    font-size: 16px;
}
.faq-answer {
    color: #666;
    line-height: 1.6;
    padding-top: 5px;
    font-size: 15px;
}
.faq-divider {
    border-color: #eaeaea;
    margin-top: 25px;
    margin-bottom: 0px;
}