/* ================= Global Styles (FROM YAQEEN, ADAPTED) ================= */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
    --primary-color: #0D47A1;      /* Cool Dark Blue */
    --secondary-color: #1DE9B6;   /* Bright Teal */
    --accent-color: #FFAB40;     /* Light Orange */
    --light-color: #f8f9fa;
    --dark-color: #263238;       /* Dark Grey-Blue */
    --text-color: #455A64;       /* Grey-Blue */
    --heading-color: #37474F;    /* Darker Grey-Blue */
    --white-color: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    --gradient: linear-gradient(135deg, var(--primary-color), #42A5F5);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
    direction: rtl;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.3;
    margin-bottom: 0.8rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-color);
}

.text-center {
    text-align: center;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}
.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: #6c757d;
}

/* ================= Buttons ================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white-color);
    box-shadow: 0 4px 10px rgba(13, 71, 161, 0.25);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(13, 71, 161, 0.35);
    color: var(--white-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}
.btn-secondary:hover {
    background-color: #00bfa5;
    transform: translateY(-3px);
    color: var(--dark-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

/* ================= Header Styles (FROM YAQEEN, ADAPTED FOR BAKHBAKH) ================= */
header {
    position: fixed; /* Crucial for sticky header */
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Sticky header style from JS (can be predefined here too)
header.scrolled {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
} */

header nav.container { /* Ensure container class is on nav for width/margin */
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px; /* Or your desired header height */
}

.nav-left-group {
    display: flex;
    align-items: center;
    gap: 40px; /* Space between logo and nav links */
}

/* Text Logo Styles */
.logo {
    text-decoration: none;
    display: inline-block;
    line-height: 1;
}
.logo .logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}
.logo .logo-dot {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Desktop Nav Links */
.desktop-nav-links {
    display: flex; /* This is key for horizontal layout */
    align-items: center;
    gap: 25px; /* Space between nav items */
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Common Nav Link Styles (Desktop & Mobile) */
.nav-links a {
    font-weight: 500;
    color: var(--heading-color);
    padding: 5px 0;
    position: relative;
    display: block; /* Ensures padding and hover effects work well */
}

/* Desktop Underline Effect */
.desktop-nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    right: 0; /* For RTL */
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
.desktop-nav-links a:hover::after,
.desktop-nav-links a.active::after {
    width: 100%;
}

/* Basic Dropdown for Desktop Nav */
.nav-links .dropdown { /* Target li.dropdown */
    position: relative;
}
.nav-links .dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; /* Align to the right in RTL */
    background-color: var(--white-color);
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: 0 0 6px 6px;
    padding: 10px 0;
    z-index: 1001;
    border-top: 2px solid var(--secondary-color);
    list-style: none; /* Reset list style */
}
.nav-links .dropdown:hover .dropdown-menu {
    display: block;
}
.nav-links .dropdown-menu li a {
    padding: 8px 15px;
    display: block;
    color: var(--text-color);
    font-weight: 400;
}
.nav-links .dropdown-menu li a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}
.nav-links .dropdown-menu li a::after { /* Remove main nav underline from dropdown items */
    display: none;
}
.nav-links .dropdown a .fa-chevron-down { /* Style for dropdown arrow */
    font-size: 0.7em;
    margin-right: 5px; /* margin-left for LTR */
    transition: transform 0.3s ease;
}
.nav-links .dropdown:hover a .fa-chevron-down {
    transform: rotate(180deg);
}


.nav-right-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between icons/buttons */
}

/* Header Icons (Search, Cart, User) */
.icon-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
    position: relative; /* For cart count */
    line-height: 1; /* Helps with alignment */
}
.icon-btn:hover {
    color: var(--secondary-color);
}
.cart-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -8px; /* Adjust for RTL */
    background-color: var(--accent-color);
    color: var(--white-color);
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop by default */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1; /* Important for alignment */
    padding: 5px; /* Make it easier to tap */
}

/* Mobile Navigation Content (Hidden initially, shown by JS) */
.mobile-nav-content {
    display: none; /* Crucial: Hidden by default */
    position: absolute;
    top: 100%; /* Position below the header */
    left: 0;
    right: 0;
    background-color: var(--white-color);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    padding: 15px 20px;
    flex-direction: column;
    align-items: center; /* Center items in mobile menu */
    gap: 0; /* Reset gap for mobile links */
    z-index: 1050; /* Ensure it's above other content */
    border-top: 1px solid var(--border-color);
}
/* This class is added by JS to show the mobile menu */
.mobile-nav-content.mobile-menu-open {
    display: flex;
}

/* Mobile Menu Links */
.mobile-nav-content .nav-links {
    flex-direction: column;
    text-align: center;
    width: 100%;
    margin-bottom: 15px; /* Space before potential CTA button */
}
.mobile-nav-content .nav-links li {
    width: 100%;
}
.mobile-nav-content .nav-links a {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-color);
}
.mobile-nav-content .nav-links li:last-child a {
    border-bottom: none;
}
.mobile-nav-content .nav-links a::after { /* Hide desktop underline on mobile */
    display: none;
}

/* Mobile Dropdown Styling */
.mobile-nav-content .mobile-dropdown-toggle .fa-chevron-down {
    font-size: 0.7em;
    margin-right: 5px;
    transition: transform 0.3s ease;
}
.mobile-nav-content .mobile-dropdown-toggle.open .fa-chevron-down {
    transform: rotate(180deg);
}
.mobile-nav-content .mobile-dropdown-menu {
    display: none; /* Controlled by JS */
    background-color: var(--light-color);
    padding-right: 15px; /* Indent sub-items */
    width: 100%;
    list-style: none; /* Ensure no bullets */
}
.mobile-nav-content .mobile-dropdown-menu li a {
    padding: 8px 0;
    font-size: 0.9em;
    border-bottom: 1px solid #e9ecef;
}
.mobile-nav-content .mobile-dropdown-menu li:last-child a {
    border-bottom: none;
}


/* ================= Hero Section (FROM YAQEEN, ADAPTED FOR BAKHBAKH) ================= */
.hero {
    background: var(--gradient);
    color: var(--white-color);
    min-height: 85vh; /* Or adjust as needed, e.g., 75vh */
    display: flex; /* This is key */
    align-items: center; /* This is key */
    padding-top: 100px; /* Account for fixed header */
    padding-bottom: 60px; /* Some padding at bottom */
    position: relative;
    overflow: hidden; /* Prevent decorative elements from causing scroll */
}

/* Decorative elements from Yaqeen's hero, adjust if needed */
.hero::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    opacity: 0.6;
}
.hero::after {
    content: '';
    position: absolute;
    top: 50px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(29, 233, 182, 0.08); /* Teal with low opacity */
    border-radius: 50%;
    opacity: 0.7;
}

.hero .container {
    display: flex; /* For side-by-side layout of content and graphic */
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative; /* For z-index stacking if needed */
    z-index: 1; /* Above ::before and ::after */
}

.hero-content {
    max-width: 600px; /* Or adjust as needed, e.g., 50% or 55% */
    /* text-align: right; /* Ensure text is aligned right for RTL */
}

.hero h1 {
    color: var(--white-color);
    font-size: 3rem; /* Or Yaqeen's default */
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero .btn {
    margin-left: 10px; /* margin-right in LTR */
}
.hero .btn:first-of-type {
    margin-left: 0; /* No margin for the first button */
}

.hero .btn-outline { /* Ensure this is styled correctly for hero */
    border-color: var(--white-color);
    color: var(--white-color);
}
.hero .btn-outline:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

.hero-graphic {
    max-width: 450px; /* Or adjust as needed, e.g., 40% or 45% */
    /* margin-right: auto; /* Push to the left in RTL if text-align is not used on parent */
}
.hero-graphic img {
     animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* ================= Featured Categories Section (BAKHBAKH) ================= */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.category-card {
    display: block;
    background-color: var(--white-color);
    padding: 30px 25px;
    border-radius: 6px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    color: var(--text-color); /* Maintain base text color on hover for <p> */
}
.category-card:hover h3 {
    color: var(--secondary-color);
}
.category-icon {
    margin: 0 auto 20px auto; /* Center the icon div */
    display: flex; /* For centering image inside */
    align-items: center;
    justify-content: center;
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 50%;
    width: 80px;
    height: 80px;
}
.category-icon img {
    max-height: 40px;
}
.category-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.3rem;
}
.category-card p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0;
}

/* ================= Featured Products Section (BAKHBAKH) ================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.product-card {
    background-color: var(--white-color);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.product-image-container {
    position: relative;
    background-color: #f0f0f0;
    line-height: 0;
}
.product-image-container img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 10px;
}
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px; /* For RTL */
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--white-color);
    border-radius: 4px;
    z-index: 5;
}
.new-badge { background-color: var(--secondary-color); }
.sale-badge { background-color: var(--accent-color); }
.hot-badge { background-color: #E53935; }

.product-info {
    padding: 15px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.product-title {
    margin-bottom: 8px;
    font-size: 1.05rem;
    color: var(--heading-color);
    font-weight: 500;
    line-height: 1.4;
    min-height: 40px; /* Approx 2 lines */
}
.product-title a {
    color: inherit; /* Inherit color from .product-title */
}
.product-title a:hover {
    color: var(--primary-color);
}
.product-price {
    margin-bottom: 15px;
}
.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}
.old-price {
    font-size: 0.9rem;
    color: #757575;
    text-decoration: line-through;
    margin-right: 8px; /* For RTL */
}
.product-actions {
    margin-top: auto;
}
.product-actions .btn-sm {
    padding: 8px 15px;
    font-size: 0.85rem;
}
.product-actions .add-to-cart-btn i {
    margin-left: 5px; /* For RTL */
}

/* ================= Features Section (Why Choose Us - Reusing Yaqeen's) ================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background-color: var(--white-color);
    border-radius: 6px;
    border: 1px solid #e9ecef;
}
.feature-icon {
    font-size: 1.8rem;
    color: var(--secondary-color);
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    margin-top: 3px; /* Small adjustment for alignment */
}
.feature-item h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--primary-color);
}
.feature-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ================= CTA Section (FROM YAQEEN) ================= */
.cta {
    background: var(--gradient);
    color: var(--white-color);
}
.cta h2 {
    color: var(--white-color);
    margin-bottom: 1rem;
}
.cta p {
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1.1rem;
}
.cta .btn-primary { /* Inverted style for CTA button */
    background: var(--white-color);
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.cta .btn-primary:hover {
    background: var(--light-color);
    color: var(--primary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* ================= Footer Styles (FROM YAQEEN, ADAPTED FOR BAKHBAKH) ================= */
footer {
    background-color: var(--primary-color);
    color: #e0e0e0;
    padding: 60px 0 20px 0;
    margin-top: 50px; /* Or more, if needed */
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}
.footer-logo.logo { /* Specific for footer logo if needed */
    display: block; /* Center it if parent is text-align:center */
    margin-bottom: 15px;
    text-align: center; /* Center the logo text if not already */
}
footer .logo .logo-text {
    font-size: 1.6rem; /* Slightly smaller for footer */
    color: var(--white-color);
}
footer .logo .logo-dot {
    font-size: 1.8rem;
    color: var(--secondary-color);
}
.footer-about p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: #e0e0e0;
}
.social-links {
    display: flex; /* For centering or spacing */
    gap: 10px; /* Space between social icons */
    /* justify-content: center; /* If footer-about is text-align center */
}
.social-links a {
    color: #e0e0e0;
    font-size: 1.3rem;
    /* margin-left: 15px; /* For RTL - replaced by gap */
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: var(--secondary-color);
}
.footer-links h4,
.footer-contact h4 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.footer-links ul {
    list-style: none; /* Ensure no bullets */
    padding: 0;
}
.footer-links ul li {
    margin-bottom: 10px;
}
.footer-links ul li a {
    color: #e0e0e0;
}
.footer-links ul li a:hover {
    color: var(--white-color);
    padding-right: 5px; /* Indent on hover - RTL */
}
.footer-contact p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
}
.footer-contact p i {
    color: var(--secondary-color);
    width: 15px;
    text-align: center; /* Center icon if width is set */
}
.footer-contact a {
    color: #e0e0e0;
}
.footer-contact a:hover {
     color: var(--white-color);
}
footer hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 30px 0;
}
.copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #b0bec5;
}

/* ================= Animations on Scroll (FROM YAQEEN) ================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= Responsive Styles (FROM YAQEEN, CHECK AND ADAPT) ================= */
@media (max-width: 992px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.8rem; }
    .hero h1 { font-size: 2.6rem; }

    .hero .container {
        flex-direction: column;
        text-align: center; /* Center content in hero on smaller screens */
    }
    .hero-content {
        max-width: 100%; /* Full width for content */
        margin-bottom: 30px;
        text-align: center; /* Ensure content is centered */
    }
    .hero-graphic {
        max-width: 350px;
        margin: 0 auto; /* Center graphic */
    }
    /* contact-grid might not be on this page */
}

@media (max-width: 768px) {
    body { font-size: 15px; }
    .section-padding { padding: 60px 0; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .hero h1 { font-size: 2.2rem; }

    /* --- Mobile Header Adjustments --- */
    .desktop-nav-links,
    .nav-right-group .icon-btn:not(.cart-btn):not([aria-label="My Account"]) /* Hide desktop search, potentially user if simple */
     {
        display: none; /* Hide desktop elements not needed on mobile nav bar */
    }
    .nav-right-group .icon-btn[aria-label="Search"] { display: none; } /* Explicitly hide search on mobile bar */


    .mobile-menu-toggle {
        display: block; /* Show mobile toggle */
        order: -1; /* For RTL, to keep it on the left if other icons are present */
        margin-left: 10px; /* Add some space if next to other icons */
    }
    .nav-left-group {
        /* On mobile, logo might take more space, reduce gap or adjust flex */
        gap: 15px; /* Reduce gap if logo and toggle are too close */
    }
     .logo .logo-text { font-size: 1.6rem; }
     .logo .logo-dot { font-size: 1.8rem; }


    /* --- Other Mobile Styles --- */
    .hero { min-height: auto; padding: 120px 0 60px 0; } /* Adjust padding for mobile hero */

    .features-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; gap: 20px; } /* Single column for products */
    .categories-grid { grid-template-columns: 1fr; gap: 20px; } /* Single column for categories */

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-about .social-links {
        justify-content: center; /* Center social links */
    }
    .footer-links ul {
        padding: 0; /* Reset padding if any */
    }
    .footer-contact p {
        justify-content: center; /* Center contact info items */
    }
}
/* ... (في نهاية ملف bakhbakh-style.css قبل @media queries) ... */

/* Main content padding to offset fixed header */
.page-main-content {
    padding-top: 70px; /* يجب أن يكون مساوياً لـ min-height الخاص بالهيدر أو أكثر قليلاً */
}

/* Global message styling for user feedback */
.message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.message.success {
    background-color: #d1e7dd; /* Bootstrap success bg */
    color: #0f5132; /* Bootstrap success text */
    border-color: #badbcc; /* Bootstrap success border */
}
.message.error {
    background-color: #f8d7da; /* Bootstrap danger bg */
    color: #842029; /* Bootstrap danger text */
    border-color: #f5c2c7; /* Bootstrap danger border */
}
.message.info {
    background-color: #cff4fc; /* Bootstrap info bg */
    color: #055160; /* Bootstrap info text */
    border-color: #b6effb; /* Bootstrap info border */
}

/* Login/Register Form Styling (أساسي) */
.auth-form-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.auth-form-container h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 25px;
}
.form-group { /* يمكن إعادة استخدام هذا من CSS لوحة التحكم مع تعديلات طفيفة إذا لزم الأمر */
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--heading-color);
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] /* In case you use email later */ {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.15);
}
.auth-form-container .btn-submit-auth { /* زر مخصص لـ login/register */
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--gradient);
    color: var(--white-color);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.auth-form-container .btn-submit-auth:hover {
    opacity: 0.9;
}
.auth-form-container .form-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}
.auth-form-container .form-footer-text a {
    color: var(--secondary-color);
    font-weight: 500;
}
/* ... (الأنماط العامة، الهيدر، الفوتر، إلخ. تبقى كما هي) ... */

/* ================= General Page Section Styling ================= */
.page-section {
    padding-top: 40px; /* Adjust as needed */
    padding-bottom: 60px; /* Adjust as needed */
}

/* ================= Shop and Category Page Headers ================= */
.shop-header { /* For shop.php and category.php */
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--light-color); /* Light background for header section */
    border-radius: 8px;
}
.shop-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}
.shop-header p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
}


/* ================= Products Grid Styling (VERY IMPORTANT) ================= */
.products-grid {
    display: grid;
    /* 
     *  minmax(280px, 1fr) يعني:
     *  - أصغر عرض للبطاقة هو 280px.
     *  - إذا كان هناك مساحة كافية، سيتم توزيع البطاقات بالتساوي (1fr).
     *  - auto-fit: سيحاول ملء الصف بأكبر عدد ممكن من البطاقات التي تناسب العرض الأدنى.
     */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* هذا هو السطر الرئيسي للشبكة */
    gap: 30px; /* المسافة بين بطاقات المنتجات */
    margin-top: 20px; /* مسافة فوق شبكة المنتجات */
}

/* بطاقة المنتج الفردية */
.product-card {
    background-color: var(--white-color);
    border-radius: 8px; /* زوايا أكثر نعومة */
    overflow: hidden; /* لمنع تجاوز العناصر */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* ظل أنعم */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex; /* يجعل العناصر الداخلية مرنة */
    flex-direction: column; /* يرتب العناصر عموديًا (الصورة فوق المعلومات) */
    text-align: center; /* توسيط محتوى البطاقة */
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-image-container {
    position: relative;
    background-color: #f7f7f7; /* خلفية خفيفة لمكان الصورة */
    line-height: 0; /* لإزالة أي مسافة إضافية تحت الصورة */
    padding: 15px; /* مسافة حول الصورة داخل الحاوية */
    /* aspect-ratio: 1 / 1; /* لجعل الحاوية مربعة، يمكنك تعديلها أو إزالتها */
    min-height: 220px; /* ارتفاع أدنى لحاوية الصورة لتوحيد الشكل */
    display: flex; /* لتوسيط الصورة أو الـ placeholder */
    align-items: center;
    justify-content: center;
}

.product-image-container img {
    max-width: 100%;
    max-height: 200px; /* تحديد أقصى ارتفاع للصورة نفسها */
    height: auto; /* للحفاظ على نسبة العرض إلى الارتفاع */
    display: block;
    object-fit: contain; /* يضمن ظهور الصورة كاملة بدون قص، مع الحفاظ على النسبة */
}

/* Placeholder icon for product images */
.product-image-container .image-placeholder-icon {
    /* display: none;  يتم التحكم به عبر JS (onerror) أو مباشرة في PHP إذا لم توجد صورة */
    display: flex; /* إذا كنت تريد إظهاره دائمًا إذا لم توجد صورة */
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%; /* يجب أن يكون مساويًا لـ min-height الخاص بـ .product-image-container */
    min-height: 180px; /* تأكد أن له ارتفاع كاف */
    color: #b0bec5; /* لون أيقونة الكاميرا (أفتح) */
    background-color: transparent; /* لا حاجة لخلفية إذا كانت حاوية الصورة لها خلفية */
    /* position: absolute; /* ليس ضروريًا إذا كان هو العنصر الوحيد أو تم إخفاء img */
    /* top: 0; left: 0; */
}
.product-image-container .image-placeholder-icon i {
    font-size: 3rem; /* حجم أيقونة الكاميرا */
}


.product-badge { /* مثل "خصم" أو "جديد" */
    position: absolute;
    top: 15px;
    right: 15px; /* للـ RTL */
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--white-color);
    border-radius: 4px;
    z-index: 5;
    line-height: 1.2;
}
.sale-badge { background-color: var(--accent-color); } /* برتقالي */
.new-badge { background-color: var(--secondary-color); } /* تيل */


.product-info {
    padding: 20px; /* padding حول معلومات المنتج */
    flex-grow: 1; /* يجعل هذا الجزء يملأ المساحة المتبقية إذا كان ارتفاع البطاقات مختلفًا */
    display: flex;
    flex-direction: column; /* لترتيب العناصر الداخلية عموديًا */
    justify-content: space-between; /* لدفع زر "أضف للسلة" للأسفل */
}

.product-title {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--heading-color);
    font-weight: 600; /* خط أثقل قليلاً لاسم المنتج */
    line-height: 1.4;
    min-height: 50px; /* محاولة لتوحيد ارتفاع العنوان (حوالي سطرين) */
}
.product-title a {
    color: inherit;
}
.product-title a:hover {
    color: var(--primary-color);
}

.product-price {
    margin-bottom: 15px;
}
.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}
.old-price {
    font-size: 0.95rem;
    color: #757575;
    text-decoration: line-through;
    margin-right: 10px; /* للـ RTL */
}

.product-actions {
    margin-top: auto; /* يدفع هذا الجزء للأسفل */
}
.product-actions .btn-sm { /* إذا كنت تستخدم كلاس btn-sm */
    padding: 8px 18px;
    font-size: 0.9rem;
}
.product-actions .btn-primary i { /* أيقونة داخل زر إضافة للسلة */
    margin-left: 8px; /* للـ RTL */
}

/* Empty State Styling (إذا لم توجد منتجات) */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #777;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    margin-top: 30px;
}
.empty-state i {
    font-size: 4rem; /* أيقونة كبيرة */
    margin-bottom: 20px;
    color: var(--secondary-color);
}
.empty-state h2 {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 10px;
}


/* ================= Product Detail Page Specifics ================= */
.product-detail-page .product-detail-grid {
    display: grid;
    grid-template-columns: 1fr; /* عمود واحد مبدئيًا */
    gap: 30px;
}

@media (min-width: 768px) { /* لشاشات أكبر من الموبايل */
    .product-detail-page .product-detail-grid {
        grid-template-columns: 2fr 3fr; /* الصورة أصغر من المعلومات */
        /* أو grid-template-columns: 1fr 1fr; إذا أردت توزيعًا متساويًا */
        gap: 40px;
    }
}

.product-detail-image-gallery .main-product-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px; /* مسافة داخلية حول الصورة الرئيسية */
    background-color: #f9f9f9;
}
.main-product-image-placeholder { /* إذا كانت أيقونة placeholder */
    width: 100%;
    min-height: 350px; /* ارتفاع أدنى */
    border-radius: 8px;
    border: 1px solid var(--border-color);
}


.product-detail-info .product-breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.product-detail-info .product-breadcrumb li {
    color: #6c757d;
}
.product-detail-info .product-breadcrumb li a {
    color: var(--primary-color);
    text-decoration: none;
}
.product-detail-info .product-breadcrumb li a:hover {
    text-decoration: underline;
}
.product-detail-info .product-breadcrumb li + li::before {
    content: "/"; /* أو " < " للـ RTL */
    padding: 0 8px;
    color: #6c757d;
}

.product-detail-title {
    font-size: 2rem; /* عنوان أكبر لاسم المنتج */
    color: var(--heading-color);
    margin-bottom: 15px;
}

.product-detail-price .current-price-detail {
    font-size: 1.8rem; /* سعر أكبر في صفحة التفاصيل */
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 10px; /* للـ RTL */
}
.product-detail-price .old-price-detail {
    font-size: 1.2rem;
    color: #757575;
    text-decoration: line-through;
}

.stock-status {
    font-weight: 500;
    margin: 15px 0;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block; /* ليأخذ عرض المحتوى فقط */
}
.stock-status.available {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}
.stock-status.out-of-stock {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}
.stock-status i {
    margin-left: 8px; /* للـ RTL */
}

.product-short-description {
    margin: 20px 0;
    line-height: 1.7;
    color: var(--text-color);
}

.add-to-cart-form {
    margin-top: 25px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px; /* مسافة بين الكمية وزر الإضافة */
}
.quantity-selector label {
    font-size: 0.9rem;
    margin-left: 5px; /* للـ RTL */
    font-weight: 500;
}
.quantity-selector input[type="number"] {
    width: 70px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.btn-add-to-cart.btn-lg { /* زر إضافة للسلة بحجم أكبر */
    padding: 12px 25px;
    font-size: 1.1rem;
}
.btn-add-to-cart.btn-lg i {
    margin-left: 8px; /* للـ RTL */
}

.product-meta {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
}
.product-meta strong {
    color: var(--heading-color);
}

.product-full-description.card {
    border-top: 3px solid var(--primary-color); /* تمييز هذا القسم */
}
.product-full-description p {
    line-height: 1.8;
    color: var(--text-color);
}


/* ================= Responsive Adjustments for Products Grid ================= */
@media (max-width: 992px) { /* شاشات متوسطة */
    .products-grid {
        /* قد تحتاج لعرض بطاقتين فقط في الصف */
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) { /* شاشات تابلت صغيرة */
    .products-grid {
        /* يمكن أن تستمر بطاقتين أو تصبح واحدة */
         grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* لضمان أن البطاقة لا تصبح ضيقة جدًا */
    }
}

@media (max-width: 576px) { /* شاشات موبايل */
    .products-grid {
        grid-template-columns: 1fr; /* بطاقة واحدة في الصف على الموبايل */
        gap: 20px;
    }
    .product-card {
        text-align: right; /* محاذاة النص لليمين على الموبايل إذا أردت */
    }
    .product-info {
        padding: 15px;
    }
    .product-title {
        font-size: 1rem;
        min-height: auto; /* إلغاء الارتفاع الأدنى للعنوان على الموبايل */
    }
    .current-price {
        font-size: 1.15rem;
    }
     .product-actions .btn-sm, .product-actions .btn-primary {
        width: 100%; /* جعل الزر يأخذ العرض الكامل على الموبايل */
        padding: 10px;
        font-size: 0.95rem;
    }

    .product-detail-title {
        font-size: 1.6rem;
    }
    .product-detail-price .current-price-detail {
        font-size: 1.5rem;
    }
    .add-to-cart-form {
        flex-direction: column; /* ترتيب الكمية والزر عموديًا على الموبايل */
        align-items: stretch; /* جعل العناصر تمتد لتأخذ العرض الكامل */
    }
    .quantity-selector {
        margin-bottom: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .quantity-selector input[type="number"] {
        width: 80px; /* تعديل عرض حقل الكمية */
    }
}
/* ... (الأنماط السابقة) ... */

/* ================= Products Grid Styling (VERY IMPORTANT - ADJUSTED) ================= */
.products-grid {
    display: grid;
    /* 
     *  تغيير إلى auto-fill بدلاً من auto-fit إذا أردنا ترك مساحة فارغة
     *  بدلاً من تمديد العناصر.
     *  والأهم: تحديد عدد الأعمدة بشكل أكثر صراحة للشاشات الكبيرة مبدئيًا
     *  ثم تعديلها في media queries.
     *  
     *  الطريقة الأولى (الأكثر تحكمًا):
     *  نحدد عدد أعمدة ثابت للشاشات الكبيرة، ثم نقلله للموبايل.
     *  هنا، نفترض أننا نريد 3 أعمدة على الشاشات الكبيرة بشكل عام.
     */
    /* grid-template-columns: repeat(3, 1fr); /* 3 أعمدة متساوية مبدئيًا */
    /* أو */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* هذا السطر كان جيدًا ولكن يسبب التمدد */

    /* ***** الحل المقترح ***** */
    /* استخدمنا نفس السطر السابق، لكن سنضيف محاذاة للعناصر */
    gap: 30px;
    margin-top: 20px;

    /* 
     *  الخصائص الجديدة للمحاذاة:
     *  - justify-content: يتحكم في محاذاة الشبكة بأكملها داخل الحاوية إذا كانت أعمدة الشبكة لا تملأ كل المساحة.
     *  - justify-items: يتحكم في محاذاة العناصر الفردية داخل خلايا الشبكة الخاصة بها.
     *
     *  إذا كان لديك منتج واحد فقط، و minmax(280px, 1fr) أعطاه عرض 280px (لأنه لا يوجد 1fr ليتمدد إليه مع عناصر أخرى)
     *  فإن justify-content ستساعد في تحديد مكانه.
     */
    justify-content: flex-start; /* للـ RTL، لجعل العناصر تبدأ من اليمين. استخدم 'flex-start' لـ LTR. */
                                  /* أو 'center' إذا أردت توسيط المنتج الوحيد */

    /* 
     *  إذا كنت تريد أن يكون عرض كل بطاقة ثابتًا (مثلاً 300px) ولا يتغير حجمها أبدًا بناءً على المساحة:
     *  grid-template-columns: repeat(auto-fill, 300px);
     *  justify-content: flex-start; (أو center)
     *  ولكن minmax(280px, 1fr) أكثر مرونة للاستفادة من المساحة إذا كانت متاحة لعدة عناصر.
     */
}

/* للتأكد من أن البطاقة نفسها لا تتمدد بشكل غير مرغوب فيه إذا كانت هي الوحيدة */
.product-card {
    /* ... (بقية خصائص .product-card كما هي) ... */
    max-width: 320px; /* أو أي عرض أقصى تراه مناسبًا لبطاقة المنتج الواحدة */
                     /* هذا قد يكون ضروريًا إذا كان 1fr لا يزال يعطيها عرضًا كبيرًا جدًا */
                     /* يمكنك تجربة هذا إذا لم تعمل justify-content وحدها بشكل كامل */
    /* width: 100%; /* اجعلها تأخذ عرض الخلية التي هي فيها، ولكن الخلية نفسها يجب ألا تتمدد */
}


/* ... (بقية أنماط CSS) ... */

/* ================= Responsive Adjustments for Products Grid ================= */
@media (min-width: 1200px) { /* شاشات كبيرة جدًا (XL) */
    .products-grid {
        /* يمكنك تحديد 4 أعمدة هنا إذا أردت */
        /* grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); */
        /* أو */
        /* grid-template-columns: repeat(4, 1fr); */
        /* justify-content: flex-start; (أو center) */
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) { /* شاشات كبيرة (LG) */
    .products-grid {
        /* غالبًا 3 أعمدة مناسبة هنا */
        /* grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); */
        /* أو */
        /* grid-template-columns: repeat(3, 1fr); */
        /* justify-content: flex-start; (أو center) */
    }
}


@media (min-width: 768px) and (max-width: 991.98px) { /* شاشات متوسطة (MD) - تابلت */
    .products-grid {
        /* غالبًا 2 أو 3 أعمدة */
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* حافظنا على auto-fit هنا */
        justify-content: flex-start; /* أو center */
        gap: 25px;
    }
}

@media (min-width: 577px) and (max-width: 767.98px) { /* شاشات صغيرة (SM) - موبايل بالعرض */
    .products-grid {
        /* غالبًا 2 أعمدة */
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        justify-content: flex-start; /* أو center */
    }
}


@media (max-width: 576px) { /* شاشات موبايل (XS) */
    .products-grid {
        grid-template-columns: 1fr; /* بطاقة واحدة في الصف على الموبايل */
        gap: 20px;
        /* لا حاجة لـ justify-content هنا لأن 1fr سيأخذ العرض الكامل */
    }
    .product-card {
        max-width: none; /* اسمح للبطاقة بأخذ العرض الكامل للعمود الواحد */
    }
    /* ... (بقية تعديلات الموبايل كما هي) ... */
}
/* ... (الأنماط السابقة في bakhbakh-style.css) ... */

/* ================= Contact Page Styling ================= */
.contact-page .page-header h1 {
    color: var(--primary-color); /* يمكن استخدام heading-color إذا كان أفضل */
}
.contact-page .page-header p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 10px auto 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr; /* عمود واحد مبدئيًا */
    gap: 30px;
}

@media (min-width: 992px) { /* لشاشات أكبر */
    .contact-grid {
        grid-template-columns: 2fr 1fr; /* الفورم أكبر من معلومات الاتصال */
        /* أو grid-template-columns: 1.5fr 1fr; */
        gap: 40px;
    }
}

.contact-form-container.card,
.contact-info-container.card {
    padding: 30px; /* padding أكبر للبطاقات في صفحة الاتصال */
}

.contact-form-container h3,
.contact-info-container h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: inline-block; /* لجعل الخط السفلي بعرض النص فقط */
}
.contact-form-container p:first-of-type, /* الفقرة الأولى بعد العنوان */
.contact-info-container p:first-of-type {
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* نمط نجمة الحقول المطلوبة */
.required-asterisk {
    color: var(--accent-color); /* أو لون أحمر مثل #dc3545 */
    font-weight: bold;
    margin-right: 2px;
}

.contact-form .form-group label {
    font-weight: 500;
}
.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}
.contact-form .btn-lg { /* لتكبير زر الإرسال */
    padding: 12px 30px;
    font-size: 1.1rem;
    width: 100%; /* جعل الزر يأخذ العرض الكامل */
}
@media (min-width: 576px) {
    .contact-form .btn-lg {
        width: auto; /* إعادة الزر لحجمه الطبيعي على الشاشات الأكبر */
    }
}


.contact-info-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}
.contact-info-list .info-item {
    display: flex;
    align-items: flex-start; /* محاذاة الأيقونة مع بداية النص */
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}
.contact-info-list .info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.contact-info-list .info-icon {
    font-size: 1.5rem; /* حجم الأيقونة */
    color: var(--primary-color);
    margin-left: 20px; /* للـ RTL، مسافة بين الأيقونة والنص */
    margin-top: 3px; /* محاذاة عمودية أفضل */
    flex-shrink: 0; /* منع الأيقونة من التقلص */
    width: 30px; /* عرض ثابت للأيقونة */
    text-align: center;
}
.contact-info-list .info-text h4 {
    font-size: 1.1rem;
    color: var(--heading-color);
    margin-bottom: 5px;
    font-weight: 600;
}
.contact-info-list .info-text p {
    margin-bottom: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}
.contact-info-list .info-text p a {
    color: var(--text-color); /* لون الرابط مثل النص العادي */
    text-decoration: none;
}
.contact-info-list .info-text p a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.map-container { /* إذا أضفت خريطة */
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}
.map-container iframe {
    display: block; /* لإزالة أي مسافة إضافية */
}
/* ... (الأنماط السابقة) ... */

/* ================= Cart Page Styling ================= */
.cart-page .page-header h1 {
    color: var(--primary-color);
}

.cart-table-container {
    overflow-x: auto; /* لجعل الجدول متجاوبًا على الشاشات الصغيرة */
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.cart-table th, .cart-table td {
    padding: 15px 12px;
    text-align: right; /* RTL */
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}
.cart-table thead th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--heading-color);
    white-space: nowrap;
}
.cart-table tbody tr:last-child td {
    border-bottom: none;
}

.product-thumbnail img {
    max-width: 70px;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
.cart-item-placeholder i {
    font-size: 2rem;
    color: #ccc;
}

.product-name a {
    color: var(--heading-color);
    font-weight: 500;
    text-decoration: none;
}
.product-name a:hover {
    color: var(--primary-color);
}
.product-name .text-danger {
    font-size: 0.8em;
}


.quantity-input-group {
    display: flex;
    align-items: center;
    max-width: 150px; /* تحديد عرض لمجموعة الكمية */
}
.quantity-input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px; /* RTL: right-radius 0 */
    margin-left: -1px; /* لإزالة الحدود المزدوجة */
}
.update-qty-btn {
    border-radius: 0 4px 4px 0 !important; /* RTL: left-radius 0 */
    padding: 8px 10px;
    line-height: 1.5; /* لمحاذاة الأيقونة بشكل أفضل */
}
.update-qty-btn i { margin: 0; } /* لا حاجة لهامش للأيقونة هنا */


.remove-item-btn {
    color: var(--accent-color); /* Orange for remove */
    font-size: 1.2rem;
    text-decoration: none;
}
.remove-item-btn:hover {
    color: #e65100; /* Darker orange */
}

.cart-actions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* للسماح بالتفاف الأزرار على الشاشات الصغيرة */
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 30px;
}
.cart-actions-footer .btn {
    margin-bottom: 10px; /* إذا التفّت الأزرار */
}

.cart-totals-container {
    display: flex;
    justify-content: flex-end; /* لدفع بطاقة الإجماليات إلى اليسار في RTL */
}
.cart-totals-card.card {
    width: 100%;
    max-width: 450px; /* تحديد عرض لبطاقة الإجماليات */
    padding: 25px;
    border-top: 3px solid var(--primary-color);
}
.cart-totals-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--heading-color);
    text-align: center;
}
.cart-totals-table {
    width: 100%;
    margin-bottom: 20px;
}
.cart-totals-table th, .cart-totals-table td {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 1rem;
}
.cart-totals-table tr:last-child th,
.cart-totals-table tr:last-child td {
    border-bottom: none;
}
.cart-totals-table th {
    text-align: right;
    font-weight: 500;
    color: var(--text-color);
}
.cart-totals-table td {
    text-align: left; /* الأرقام على اليسار */
    font-weight: 600;
    color: var(--heading-color);
}
.cart-totals-table .order-total th,
.cart-totals-table .order-total td strong {
    font-size: 1.15rem;
    color: var(--primary-color);
}
.proceed-to-checkout-btn.btn-block { /* لجعل الزر يأخذ العرض الكامل */
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}


/* Cart Empty State */
.cart-empty-state i {
    color: var(--border-color); /* أيقونة باهتة */
}
.cart-empty-state h2 {
    color: var(--heading-color);
}


/* Responsive Cart Table */
@media (max-width: 768px) {
    .cart-table thead {
        display: none; /* إخفاء الهيدر التقليدي للجدول */
    }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block; /* جعل كل خلية تأخذ السطر بالكامل */
        width: 100% !important; /* !important لتجاوز أي عرض محدد */
    }
    .cart-table tr {
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 10px;
    }
    .cart-table td {
        text-align: left; /* محاذاة النص لليسار */
        padding-left: 50%; /* مسافة لاسم العمود */
        position: relative;
        border-bottom: 1px dashed #eee;
    }
    .cart-table td:last-child {
        border-bottom: none;
    }
    .cart-table td::before { /* إضافة اسم العمود كـ pseudo-element */
        content: attr(data-title);
        position: absolute;
        right: 10px; /* لـ RTL */
        left: auto;
        width: 45%;
        padding-right: 0; /* لـ RTL */
        font-weight: bold;
        color: var(--heading-color);
        white-space: nowrap;
    }

    .product-thumbnail { text-align: center !important; padding-left: 0 !important; }
    .product-thumbnail::before { display: none; }
    .product-thumbnail img { max-width: 100px; margin: 0 auto 10px auto; }
    
    .quantity-input-group { max-width: none; justify-content: flex-end; /* لـ RTL */}
    .remove-item-btn { display: block; text-align: center; padding: 10px; background: #f8f9fa; border-radius: 4px; margin-top:10px; }
    .remove-item-btn i { margin-right: 5px;}
    .remove-item-btn::before {display:none;} /* إخفاء data-title لزر الحذف */


    .cart-actions-footer {
        flex-direction: column;
        align-items: stretch; /* جعل الأزرار تأخذ العرض الكامل */
    }
    .cart-actions-footer .btn {
        width: 100%;
        margin-bottom: 10px;
    }
     .cart-totals-container {
        justify-content: center; /* توسيط بطاقة الإجماليات */
    }
    .cart-totals-card.card {
        max-width: 100%;
    }
}
/* ... (الأنماط السابقة) ... */

/* ================= Checkout Page Styling ================= */
.checkout-page .page-header h1 {
    color: var(--primary-color);
}
.checkout-form {
    margin-top: 30px;
}
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1.75fr 1fr; /* Billing details larger */
        gap: 40px;
    }
}

.checkout-section.card { /* Both billing and summary are cards */
    padding: 25px 30px;
}
.checkout-section h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.form-row { /* For side-by-side form fields */
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px; /* RTL */
    margin-left: -10px;  /* RTL */
}
.form-row > .form-group {
    padding-right: 10px; /* RTL */
    padding-left: 10px;  /* RTL */
}
.form-group.col-md-6 { width: 50%; }
.form-group.col-md-12 { width: 100%; }

@media (max-width: 767px) { /* On smaller screens, stack form-row items */
    .form-group.col-md-6 { width: 100%; }
}


.order-summary-table {
    width: 100%;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.order-summary-table th, .order-summary-table td {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.order-summary-table thead th {
    text-align: right;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.order-summary-table tbody td:last-child,
.order-summary-table tfoot td {
    text-align: left; /* Prices on the left */
    font-weight: 500;
}
.order-summary-table tfoot tr:last-child th,
.order-summary-table tfoot tr:last-child td {
    border-bottom: none;
    padding-top: 15px;
}
.order-summary-table .summary-total th,
.order-summary-table .summary-total td strong {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.payment-methods {
    margin-top: 25px;
    margin-bottom: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}
.payment-methods h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--heading-color);
}
.payment-method-option {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer; /* if the whole div is clickable */
}
.payment-method-option input[type="radio"] {
    margin-left: 10px; /* RTL */
    vertical-align: middle;
}
.payment-method-option label {
    font-weight: 500;
    vertical-align: middle;
}
.payment-method-description {
    font-size: 0.85rem;
    color: #6c757d;
    padding-right: 25px; /* RTL, indent below radio */
    margin-top: 5px;
}

.terms-agreement {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
}
.checkout-form .btn-block {
    display: block;
    width: 100%;
}
/* ... (الأنماط السابقة) ... */

/* Shop Filters Toolbar */
.shop-filters-toolbar {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center; /* أو flex لتوزيع أفضل */
}
.filter-btn {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px;
    border: 1px solid var(--border-color);
    border-radius: 20px; /* شكل بيضاوي/كبسولة */
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.filter-btn:hover {
    background-color: var(--light-color);
    border-color: #bbb;
}
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    font-weight: 500;
}
/* ... (الأنماط السابقة) ... */

/* ================= Account Page Styling ================= */
.account-page .page-header {
    text-align: right; /* RTL */
    margin-bottom: 30px;
}
.account-page .page-header h1 {
    color: var(--primary-color);
}
.account-page .page-header p strong {
    color: var(--secondary-color);
}

.account-layout {
    display: grid;
    grid-template-columns: 1fr; /* عمود واحد مبدئيًا */
    gap: 30px;
}

@media (min-width: 992px) {
    .account-layout {
        grid-template-columns: 280px 1fr; /* Sidebar then content */
        /* أو grid-template-columns: 1fr 3fr; إذا أردت السايد بار أصغر */
    }
}

.account-sidebar.card {
    padding: 20px 15px; /* padding أقل للسايد بار */
}
.account-sidebar h4 {
    font-size: 1.2rem;
    color: var(--heading-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.account-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.account-nav li a {
    display: flex; /* لمحاذاة الأيقونة مع النص */
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.account-nav li a i {
    margin-left: 10px; /* RTL */
    font-size: 1.1em;
    width: 20px; /* عرض ثابت للأيقونة */
    text-align: center;
    color: #90a4ae; /* لون خافت للأيقونات */
}
.account-nav li a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}
.account-nav li a.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    font-weight: 600;
}
.account-nav li a.active i {
    color: var(--white-color); /* أو var(--secondary-color) إذا أردت تمييزًا */
}

.account-content.card {
    padding: 25px 30px;
}
.account-content h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 20px;
}
.account-content p {
    margin-bottom: 10px;
    line-height: 1.7;
}
.account-content p strong {
    color: var(--heading-color);
    min-width: 120px; /* لترتيب النصوص بشكل أفضل */
    display: inline-block;
}

.account-orders-table-summary {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 15px;
}
.account-orders-table-summary th,
.account-orders-table-summary td {
    padding: 10px 8px;
    text-align: right; /* RTL */
    border-bottom: 1px solid var(--border-color);
}
.account-orders-table-summary thead th {
    font-weight: 600;
    background-color: var(--light-color);
}
.account-orders-table-summary tbody tr:hover {
    background-color: #f8f9fa;
}
.account-orders-table-summary .btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

@media (max-width: 991px) { /* عندما يكون السايد بار والمحتوى عموديين */
    .account-sidebar.card {
        margin-bottom: 20px; /* مسافة بين السايد بار والمحتوى */
    }
     .account-nav {
        display: flex;
        flex-wrap: wrap; /* السماح بتفاف الروابط */
        gap: 10px;
    }
    .account-nav li {
        flex-grow: 1; /* جعل العناصر تتمدد لتملأ المساحة إذا كانت قليلة */
    }
    .account-nav li a {
        justify-content: center; /* توسيط النص والأيقونة */
        margin-bottom: 0;
    }
}
/* ... (الأنماط السابقة) ... */

/* Pagination Styling */
.pagination-nav {
    margin-top: 30px;
    text-align: center;
}
.pagination-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex; /* Use inline-flex or flex */
    border-radius: 6px;
    overflow: hidden; /* To ensure border-radius on items */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.pagination-nav ul li {
    margin: 0;
}
.pagination-nav ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-left: none; /* RTL: border-right */
    background-color: var(--white-color);
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
}
.pagination-nav ul li:first-child a {
    border-left: 1px solid var(--border-color); /* RTL: border-right */
     border-radius: 0 6px 6px 0; /* RTL:  6px 0 0 6px; */
}
.pagination-nav ul li:last-child a {
     border-radius: 6px 0 0 6px; /* RTL: 0 6px 6px 0; */
}

.pagination-nav ul li a:hover {
    background-color: var(--light-color);
}
.pagination-nav ul li.active a {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    font-weight: 600;
}
.pagination-nav ul li.disabled a { /* If you implement disabled state */
    color: #aaa;
    pointer-events: none;
    background-color: #f9f9f9;
}
/* ... (الأنماط السابقة) ... */

/* ================= Order Details User Page Styling ================= */
.order-details-user-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.order-details-user-page .page-header h1 { margin-bottom: 0; }
.order-details-user-page .page-header .btn { margin-top: 5px; }


.order-details-summary.card,
.order-items-details.card,
.shipping-address-details.card,
.order-notes-details.card {
    margin-bottom: 25px;
    padding: 20px 25px;
}
.order-details-summary.card h3,
.order-items-details.card h3,
.shipping-address-details.card h3,
.order-notes-details.card h3 {
    font-size: 1.3rem;
    color: var(--heading-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.order-info-grid div {
    font-size: 0.95rem;
}
.order-info-grid div strong {
    color: var(--text-color);
    margin-left: 5px; /* RTL */
}

.order-items-table { /* إعادة استخدام نمط جدول السلة */
    margin-top: 0; /* لا حاجة لهامش علوي إذا كان العنوان h3 موجودًا */
}
/* لا حاجة لتعديلات كبيرة على .cart-table إذا كان مناسبًا هنا */
/* ... (الأنماط السابقة) ... */
.account-form-section.card {
    margin-bottom: 30px; /* مسافة بين أقسام النماذج */
}
.account-form-section h3 {
    font-size: 1.3rem;
    color: var(--heading-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.account-form-section .form-group { /* يمكن إعادة استخدام أنماط .form-group العامة */
    margin-bottom: 15px;
}
.account-form-section .btn {
    margin-top: 10px;
}
.message.success {
    background-color: #d1e7dd; /* Bootstrap success bg */
    color: #0f5132; /* Bootstrap success text */
    border-color: #badbcc; /* Bootstrap success border */
}
.message.error {
    background-color: #f8d7da; /* Bootstrap danger bg */
    color: #842029; /* Bootstrap danger text */
    border-color: #f5c2c7; /* Bootstrap danger border */
}
.message.info {
    background-color: #cff4fc; /* Bootstrap info bg */
    color: #055160; /* Bootstrap info text */
    border-color: #b6effb; /* Bootstrap info border */
}
/* يمكنك إضافة .message.warning إذا أردت */
.message.warning {
    background-color: #fff3cd; /* Bootstrap warning bg */
    color: #664d03;    /* Bootstrap warning text */
    border-color: #ffecb5; /* Bootstrap warning border */
}
/* Main content padding to offset fixed header */
.page-main-content {
    padding-top: 70px; /* أو أي ارتفاع تراه مناسباً للهيدر */
}
.product-card {
    background-color: var(--white-color);
    border-radius: 6px;
    overflow: hidden;  /* <<<<<< تأكد من وجود هذا السطر!! */
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}