:root {
    --primary: #174B83;
    --primary-light: #28609a;
    --primary-dark: #0d2c4d;
    --accent: #f0f7ff;
    --white: #ffffff;
    --bg-main: #fcfdfe;
    --text-main: #0c1c2c;
    --text-muted: #6b849c;
    --shadow-soft: 0 10px 40px rgba(23, 75, 131, 0.06);
    --shadow-bold: 0 20px 60px rgba(23, 75, 131, 0.12);
    --radius: 16px;
    --shadow: 0 10px 40px rgba(23, 75, 131, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Header */
/* Header Branding & Visibility */
header {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(23, 75, 131, 0.1);
}

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

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-btn {
    text-decoration: none;
    font-size: 22px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--accent);
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.cart-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.cart-badge {
    background: #FF4757;
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 20px;
    position: absolute;
    top: -8px;
    right: -8px;
    border: 3px solid var(--white);
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.lang-switcher {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 40px;
    gap: 4px;
}

.lang-switcher a {
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 40px;
    transition: 0.3s;
}

.lang-switcher a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 75, 131, 0.2);
}

/* Modern Hero */
.hero {
    background: radial-gradient(circle at top right, var(--primary-light), var(--primary-dark));
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.05;
}

.hero h1 {
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Premium Search */
.search-container {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.search-form {
    display: flex;
    background: white;
    padding: 6px;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.search-form input {
    flex: 1;
    border: none;
    padding: 12px 25px;
    border-radius: 40px;
    outline: none;
    font-size: 16px;
    color: var(--text-main);
}

.search-form button {
    background: var(--primary);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    font-size: 18px;
}

.search-form button:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* Product Grid */
.section-title {
    text-align: center;
    margin-bottom: 35px;
    font-size: 22px;
    color: var(--text-main);
    font-weight: 800;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(23, 75, 131, 0.12);
}

.product-code-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(23, 75, 131, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    z-index: 10;
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #fbfbfc;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    height: 48px;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-order {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: var(--primary);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
}

.btn-order:hover {
    background: var(--primary-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 60px;
}

.page-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: 0.3s;
}

.page-link.active {
    background: var(--primary);
    color: white;
}

.page-link:hover:not(.active) {
    background: var(--accent);
}
/* Product Detail Page - Premium Redesign */
.product-detail-container {
    max-width: 1240px;
    margin: 40px auto;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-bold);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
    border: 1px solid rgba(23, 75, 131, 0.05);
}

.product-detail-img {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(23, 75, 131, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(23, 75, 131, 0.02) 0%, transparent 40%);
}

.product-detail-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.product-detail-img img {
    max-width: 100%;
    max-height: 550px;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.08));
    z-index: 2;
}

.product-detail-img:hover img {
    transform: scale(1.05) translateY(-5px);
}

.product-detail-info {
    padding: 60px;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
}

.detail-code {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 24px;
    align-self: flex-start;
    border: 1.5px solid rgba(23, 75, 131, 0.1);
}

.detail-name {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.detail-price {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 40px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.detail-price span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    padding: 15px;
    background: #fbfbfc;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.03);
}

.badge-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.badge-icon {
    font-size: 20px;
}

.badge-text {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-desc-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-desc-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #f1f5f9;
}

.detail-desc {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.detail-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Sticky Mobile CTA */
.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    z-index: 999;
    border-top: 1px solid rgba(0,0,0,0.05);
    gap: 12px;
}

/* Order Page - Premium Redesign */
.order-container {
    max-width: 850px;
    margin: 60px auto;
    background: var(--white);
    padding: 60px;
    border-radius: 32px;
    box-shadow: 0 30px 100px rgba(23, 75, 131, 0.08);
    border: 1px solid rgba(23, 75, 131, 0.05);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.order-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.order-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 10px;
}

/* Empty Cart State */
.empty-cart-container {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    animation: fadeIn 0.8s ease-out;
}

.empty-cart-icon {
    font-size: 100px;
    background: var(--accent);
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: inset 0 0 40px rgba(23, 75, 131, 0.05);
}

/* Cart Items */
.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease forwards;
}

.cart-item:hover {
    transform: translateX(-8px);
    background: rgba(23, 75, 131, 0.01);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background: #f8fafc;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cart-item-info { flex: 1; }

.cart-item-title {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.cart-item-code {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

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

.qty-input {
    width: 70px;
    height: 44px;
    padding: 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 16px;
    transition: 0.3s;
}

.qty-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 75, 131, 0.1);
    outline: none;
}

.remove-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff0f0;
    color: #ff4757;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.remove-btn:hover {
    background: #ff4757;
    color: white;
    transform: rotate(90deg);
}

/* Summary Box */
.total-box {
    background: var(--accent);
    padding: 30px;
    border-radius: 20px;
    margin: 40px 0;
    border: 1px solid rgba(23, 75, 131, 0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-row span:first-child {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
}

.total-row span:last-child {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
}

/* Form Groups */
.form-group { margin-bottom: 30px; }

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 800;
    color: var(--text-main);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #f1f5f9;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    background: #fbfbfc;
    transition: all 0.3s ease;
    color: var(--text-main);
}

.form-control::placeholder {
    color: #cbd5e1;
}

.form-control:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(23, 75, 131, 0.08);
    transform: translateY(-2px);
}

.form-control.is-valid {
    border-color: #25D366;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2325D366'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1.5rem;
    padding-left: 3rem;
}

[dir="rtl"] .form-control.is-valid {
    background-position: right 1rem center;
    padding-right: 3rem;
    padding-left: 1.25rem;
}

/* Success Message */
#successMessage {
    display: none;
    text-align: center;
    padding: 40px 20px;
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.success-icon {
    width: 120px;
    height: 120px;
    background: #eefdf3;
    color: #25D366;
    font-size: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 30px;
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.15);
    border: 4px solid white;
}

.success-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 15px;
}

.success-text {
    color: #64748b;
    font-size: 17px;
    max-width: 400px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Action Buttons */
.btn-large {
    padding: 20px 36px;
    font-size: 17px;
    border-radius: 16px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 12px 30px rgba(23, 75, 131, 0.2);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(23, 75, 131, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    margin-top: 15px;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.15);
}

.btn-whatsapp:hover {
    background: #22c35e;
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.25);
}

.back-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    margin: 20px 0;
    transition: 0.3s;
    font-size: 14px;
}

.back-link:hover { transform: translateX(-5px); background: var(--accent); }
[dir="rtl"] .back-link:hover { transform: translateX(5px); }

@media (max-width: 992px) {
    .product-detail-container { grid-template-columns: 1fr; border-radius: 0; margin: 0; border: none; }
    .product-detail-img { padding: 40px; min-height: 400px; }
    .product-detail-info { padding: 40px; }
}

@media (max-width: 768px) {
    .product-detail-img { min-height: 350px; padding: 20px; }
    .product-detail-img img { max-height: 300px; }
    .product-detail-info { padding: 30px 20px 100px 20px; }
    .detail-name { font-size: 28px; }
    .detail-price { font-size: 32px; }
    .detail-actions { display: none; }
    .mobile-cta-bar { display: grid; grid-template-columns: 1fr 1.5fr; }
    .mobile-cta-bar .btn-large { padding: 14px 10px; font-size: 14px; border-radius: 10px; }
    .trust-badges { grid-template-columns: 1fr; text-align: left; }
    .badge-item { flex-direction: row; }
}

footer {
    background: var(--white);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .header-content { padding: 0 5px; }
    .logo { height: 35px; }
    .hero { padding: 40px 15px; }
    .hero h1 { font-size: 22px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-card { padding: 12px; }
    .product-img { height: 140px; margin-bottom: 12px; }
    .product-name { font-size: 14px; height: 42px; }
    .product-price { font-size: 16px; margin-bottom: 15px; }
    .btn-order { padding: 8px; font-size: 12px; }
}

@media (max-width: 380px) {
    .product-grid { grid-template-columns: 1fr; }
}