/* ============================================
   Nova Store - Professional E-commerce CSS
   RTL Arabic Layout
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

:root {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --secondary: #1f2937;
    --dark: #111827;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --star-color: #f59e0b;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--gray-50);
    color: var(--dark);
    direction: rtl;
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

/* === Top Bar === */
.top-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    max-width: 100vw;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
}

.social-icons a {
    color: var(--white);
    margin-left: 12px;
    font-size: 16px;
    transition: var(--transition);
}

.social-icons a:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.phone-number a {
    color: var(--white);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.marquee-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 60px;
    animation: marquee 20s linear infinite;
    white-space: nowrap;
    width: max-content;
}

.marquee-content span {
    flex-shrink: 0;
    font-weight: 600;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* === Header === */
.main-header {
    background: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: baseline;
}

.logo-nova {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo-store {
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -1px;
}

.logo img {
    height: 50px;
    width: auto;
}

.search-box {
    flex: 1;
    max-width: 500px;
}

.search-box form {
    display: flex;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}

.search-box form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    background: transparent;
    direction: rtl;
}

.search-box button {
    background: transparent;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 16px;
    transition: var(--transition);
}

.search-box button:hover {
    color: var(--primary);
}

/* === Hero Banner === */
.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: var(--white);
    padding: 60px 20px;
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-discount {
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    margin: 10px 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.15);
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 10px 40px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.1;
    overflow: hidden;
}

.hero-bg-shapes::before,
.hero-bg-shapes::after {
    content: '%';
    position: absolute;
    font-size: 300px;
    font-weight: 900;
    color: var(--white);
}

.hero-bg-shapes::before {
    top: -50px;
    left: -30px;
    transform: rotate(-15deg);
}

.hero-bg-shapes::after {
    bottom: -80px;
    right: -30px;
    transform: rotate(15deg);
    max-width: 100%;
}

/* === Welcome Section === */
.welcome-section {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 20px;
}

.welcome-section h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
}

.welcome-section h2 span {
    color: var(--primary);
}

/* === Product Grid === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 0 0 60px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.product-card .badge.sale {
    background: var(--danger);
}

.product-card .badge.new {
    background: var(--success);
}

.product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: var(--gray-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 15px;
    text-align: center;
}

.product-rating {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 8px;
}

.product-rating .star {
    color: var(--star-color);
    font-size: 14px;
}

.product-rating .star.empty {
    color: var(--gray-300);
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    font-size: 14px;
    color: var(--gray-400);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* === Product Detail Page === */
.product-detail {
    padding: 40px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 100%;
}

.product-gallery {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.product-gallery .main-image {
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-100);
}

.product-gallery .main-image img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    display: block;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    max-width: 100%;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
    flex-shrink: 0;
}

.gallery-thumb:hover {
    border-color: var(--primary-light);
}

.gallery-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    padding: 10px 0;
}

.product-detail-info .product-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.quality-badge {
    display: inline-block;
    background: var(--success);
    color: var(--white);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.quality-badge i {
    margin-left: 5px;
}

.detail-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 15px;
}

.detail-rating .star {
    color: var(--star-color);
    font-size: 18px;
}

.detail-price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.detail-current-price {
    font-size: 32px;
    font-weight: 900;
    color: var(--dark);
}

.detail-old-price {
    font-size: 18px;
    color: var(--gray-400);
    text-decoration: line-through;
}

.detail-discount {
    background: var(--primary);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
}

/* === Order Form === */
.order-section {
    margin-top: 5px;
}

.order-form-intro {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.8;
}

.order-form .form-group {
    margin-bottom: 18px;
}

.order-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--dark);
    font-size: 15px;
}

.order-form label .required {
    color: var(--danger);
}

.order-form input,
.order-form select,
.order-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    direction: rtl;
    background: var(--white);
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.order-form .quantity-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--dark);
}

.quantity-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quantity-input {
    width: 60px !important;
    text-align: center;
    font-weight: 700;
}

.submit-order {
    width: 100%;
    padding: 16px;
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-order:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.submit-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-order .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Order Summary === */
.order-summary {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--gray-200);
}

.order-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}

.order-summary .summary-row.total {
    border-top: 2px solid var(--gray-200);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
}

/* === Success Message === */
.order-success {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 40px auto;
    max-width: 500px;
}

.order-success .success-icon {
    font-size: 80px;
    color: var(--success);
    margin-bottom: 20px;
}

.order-success h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.order-success p {
    color: var(--gray-500);
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-back-home {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-back-home:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* === Footer === */
.main-footer {
    background: var(--primary);
    color: var(--white);
    padding: 40px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 30px;
}

.footer-contact h3,
.footer-social h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 8px;
    display: inline-block;
}

.footer-contact p {
    margin-bottom: 8px;
    font-size: 15px;
}

.footer-social-icons {
    display: flex;
    gap: 15px;
}

.footer-social-icons a {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--white);
    transition: var(--transition);
}

.footer-social-icons a:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 14px;
    opacity: 0.8;
}

/* === WhatsApp Float === */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    right: auto;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 999;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6); }
}

/* === Alert Messages === */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* === No Products === */
.no-products {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-400);
}

.no-products i {
    font-size: 60px;
    margin-bottom: 20px;
    display: block;
}

.no-products h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
}

.pagination a, .pagination span {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.pagination a {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-200);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */

.admin-body {
    background: var(--gray-100);
    min-height: 100vh;
}

/* Admin Login */
.admin-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    padding: 20px;
}

.admin-login-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.admin-login-box h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.admin-login-box p {
    color: var(--gray-500);
    margin-bottom: 30px;
}

.admin-login-box .form-group {
    margin-bottom: 20px;
    text-align: right;
}

.admin-login-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark);
}

.admin-login-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
}

.admin-login-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.admin-login-box .btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: var(--transition);
}

.admin-login-box .btn-login:hover {
    background: var(--primary-dark);
}

/* Admin Navbar */
.admin-navbar {
    background: var(--dark);
    padding: 12px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-navbar .nav-brand {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.admin-navbar .nav-links {
    display: flex;
    gap: 5px;
}

.admin-navbar .nav-links a {
    color: var(--gray-300);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}

.admin-navbar .nav-links a:hover,
.admin-navbar .nav-links a.active {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

.admin-navbar .nav-links a.logout-link {
    color: var(--danger);
}

/* Admin Dashboard */
.admin-content {
    padding: 30px 0;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.stat-card .stat-icon.products { color: var(--primary); }
.stat-card .stat-icon.orders { color: var(--success); }
.stat-card .stat-icon.new-orders { color: var(--danger); }
.stat-card .stat-icon.revenue { color: #8b5cf6; }

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--dark);
}

.stat-card .stat-label {
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
}

/* Admin Table */
.admin-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 25px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-200);
}

.admin-card-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--gray-50);
    padding: 14px 20px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: var(--gray-50);
}

.admin-table .product-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.admin-table .actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.new { background: #fee2e2; color: #991b1b; }
.status-badge.processing { background: #fef3c7; color: #92400e; }
.status-badge.shipped { background: #dbeafe; color: #1e40af; }
.status-badge.delivered { background: #d1fae5; color: #065f46; }
.status-badge.cancelled { background: var(--gray-200); color: var(--gray-600); }

/* Admin Form */
.admin-form {
    padding: 30px;
}

.admin-form .form-group {
    margin-bottom: 22px;
}

.admin-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.admin-form textarea {
    resize: vertical;
    min-height: 120px;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.admin-form .image-preview {
    width: 150px;
    height: 150px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 10px;
    background: var(--gray-50);
}

.admin-form .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === Responsive Design === */
@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-grid {
        padding: 20px;
    }

    .product-gallery .main-image img {
        height: auto;
        max-height: 400px;
    }

    .hero-discount {
        font-size: 80px;
    }

    .hero-content h2 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 5px;
        max-width: 100%;
    }

    .marquee-wrapper {
        max-width: 100%;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-discount {
        font-size: 60px;
    }

    .hero-subtitle {
        font-size: 16px;
        padding: 8px 24px;
    }

    .hero-banner {
        min-height: 280px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-social-icons {
        justify-content: center;
    }

    .welcome-section h2 {
        font-size: 26px;
    }

    .product-detail-info .product-title {
        font-size: 22px;
    }

    .detail-current-price {
        font-size: 26px;
    }

    .admin-form .form-row {
        grid-template-columns: 1fr;
    }

    .admin-navbar .container {
        flex-direction: column;
        gap: 10px;
    }

    .admin-navbar .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th, .admin-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-image {
        height: 160px;
    }

    .product-name {
        font-size: 13px;
        min-height: 36px;
    }

    .current-price {
        font-size: 16px;
    }

    .old-price {
        font-size: 12px;
    }

    .product-detail-grid {
        padding: 15px;
        gap: 20px;
    }

    .product-gallery .main-image img {
        height: auto;
        max-height: 320px;
    }

    .gallery-thumb {
        width: 65px;
        height: 65px;
    }

    .logo h1 {
        font-size: 22px;
    }
}

/* === Loading Animation === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-box h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.modal-box p {
    color: var(--gray-500);
    margin-bottom: 20px;
}

.modal-box .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
