/**
 * Ticr Store - Main Stylesheet
 * متجر تيكر - التنسيقات الرئيسية
 */

/* ============================================
   المتغيرات والألوان
   ============================================ */
:root {
    --primary-color: #3D7D70;
    --primary-dark: #2d5d54;
    --primary-light: #4d9d8d;
    --secondary-color: #1a1a2e;
    --accent-color: #f39c12;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a1a2e;
    
    --border-color: #e0e0e0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    --transition: all 0.3s ease;
    --font-family: 'Cairo', 'Segoe UI', sans-serif;
}

/* ============================================
   إعادة التعيين والأساسيات
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    direction: rtl;
}

body.ltr {
    direction: ltr;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   Container والشبكة
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    padding: 0 10px;
    flex: 1;
}

/* Grid Columns */
.col-1 { width: 8.333%; }
.col-2 { width: 16.666%; }
.col-3 { width: 25%; }
.col-4 { width: 33.333%; }
.col-5 { width: 41.666%; }
.col-6 { width: 50%; }
.col-7 { width: 58.333%; }
.col-8 { width: 66.666%; }
.col-9 { width: 75%; }
.col-10 { width: 83.333%; }
.col-11 { width: 91.666%; }
.col-12 { width: 100%; }

/* ============================================
   الهيدر
   ============================================ */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 8px 0;
    font-size: 14px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top .contact-info {
    display: flex;
    gap: 20px;
}

.header-top .contact-info a {
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-top .language-currency {
    display: flex;
    gap: 15px;
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

/* شريط البحث */
.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar form {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 12px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

/* أيقونات الهيدر */
.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-primary);
    font-size: 13px;
}

.header-icon i {
    font-size: 22px;
}

.header-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon:hover {
    color: var(--primary-color);
}

/* القائمة الرئيسية */
.main-nav {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.main-nav a {
    display: block;
    padding: 15px 0;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* القائمة المتنقلة */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

/* ============================================
   البانر والسلايدر
   ============================================ */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ============================================
   الأزرار
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background: var(--bg-secondary);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   البطاقات
   ============================================ */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-price .current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.card-price .old-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.card-price .discount {
    background: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* شارات المنتج */
.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-new {
    background: var(--primary-color);
    color: white;
}

.badge-sale {
    background: var(--danger-color);
    color: white;
}

.badge-hot {
    background: var(--accent-color);
    color: white;
}

/* أزرار المنتج السريعة */
.product-actions {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.card:hover .product-actions {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.product-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}

.product-action-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ============================================
   شبكة المنتجات
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.products-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ============================================
   الأقسام
   ============================================ */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.section-header.text-start {
    text-align: right;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* ============================================
   التصنيفات
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.category-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    text-align: center;
}

.category-card .overlay h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.category-card .overlay span {
    font-size: 14px;
    opacity: 0.8;
}

/* ============================================
   Flash Sale
   ============================================ */
.flash-sale {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 50px 0;
}

.flash-sale .section-title {
    color: white;
}

.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.countdown {
    display: flex;
    gap: 15px;
}

.countdown-item {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 70px;
}

.countdown-item .number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.countdown-item .label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   النشرة البريدية
   ============================================ */
.newsletter {
    background: var(--secondary-color);
    padding: 60px 0;
    color: white;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.newsletter p {
    margin-bottom: 30px;
    opacity: 0.8;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--border-radius);
    outline: none;
}

.newsletter-form button {
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-light);
}

/* ============================================
   الفوتر
   ============================================ */
.footer {
    background: var(--bg-dark);
    color: white;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-about p {
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-widget h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul a {
    opacity: 0.8;
    transition: var(--transition);
}

.footer-widget ul a:hover {
    opacity: 1;
    color: var(--primary-color);
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.7;
}

/* ============================================
   صفحة المنتج
   ============================================ */
.product-page {
    padding: 40px 0;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    color: var(--accent-color);
}

.product-price-large {
    margin-bottom: 25px;
}

.product-price-large .current {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price-large .original {
    font-size: 20px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-right: 15px;
}

.product-description {
    margin-bottom: 30px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-selector label {
    font-weight: 600;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.quantity-input button {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.quantity-input button:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-input input {
    width: 60px;
    height: 45px;
    text-align: center;
    border: none;
    font-weight: 600;
}

.add-to-cart-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.wishlist-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.wishlist-btn:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* ============================================
   سلة التسوق
   ============================================ */
.cart-page {
    padding: 40px 0;
}

.cart-table {
    width: 100%;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-table th {
    background: var(--bg-secondary);
    padding: 15px 20px;
    text-align: right;
    font-weight: 600;
}

.cart-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.cart-item-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.cart-item-info .sku {
    font-size: 13px;
    color: var(--text-light);
}

.remove-btn {
    color: var(--danger-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.cart-summary {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
    margin-top: 20px;
}

/* ============================================
   صفحة الدفع
   ============================================ */
.checkout-page {
    padding: 40px 0;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
}

.checkout-form {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group label .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-control.error {
    border-color: var(--danger-color);
}

.error-message {
    color: var(--danger-color);
    font-size: 13px;
    margin-top: 5px;
}

/* طرق الدفع */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.payment-method {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-method:hover,
.payment-method.selected {
    border-color: var(--primary-color);
    background: rgba(61, 125, 112, 0.05);
}

.payment-method input {
    display: none;
}

.payment-method .radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
}

.payment-method.selected .radio-custom {
    border-color: var(--primary-color);
}

.payment-method.selected .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.payment-method img {
    height: 30px;
}

.payment-method span {
    font-weight: 600;
}

/* ============================================
   لوحة تحكم المستخدم
   ============================================ */
.dashboard {
    padding: 40px 0;
}

.dashboard-sidebar {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.user-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.user-profile h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.user-profile p {
    color: var(--text-secondary);
    font-size: 14px;
}

.dashboard-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    transition: var(--transition);
}

.dashboard-menu li a:hover,
.dashboard-menu li a.active {
    background: var(--primary-color);
    color: white;
}

.dashboard-menu li a i {
    width: 20px;
}

.dashboard-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   التنبيهات
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-error,
.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

/* ============================================
   التحميل
   ============================================ */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   الـ Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    background: white;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .active {
    background: var(--primary-color);
    color: white;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

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

.breadcrumb span {
    color: var(--text-light);
}

/* ============================================
   التبويبات
   ============================================ */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
}

.tab {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    transition: var(--transition);
}

.tab:hover,
.tab.active {
    color: var(--primary-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .header-main .container {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 15px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-slide {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-widget h4::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .countdown {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .cart-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .header-top-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-icons {
        gap: 15px;
    }
    
    .hero-slide {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .add-to-cart-section {
        flex-direction: column;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   LTR Support
   ============================================ */
body.ltr .footer-widget h4::after {
    right: auto;
    left: 0;
}

body.ltr .main-nav a::after {
    right: auto;
    left: 0;
}

body.ltr .search-bar input {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

body.ltr .search-bar button {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

body.ltr .header-icon .badge {
    right: auto;
    left: -5px;
}

body.ltr .product-badges {
    right: auto;
    left: 15px;
}
