/* =========================================
   BALEINEES.COM - Main Stylesheet
   Theme: Light Orange + Navy Blue + White
   Mobile-First Responsive Design
   ========================================= */

:root {
    --orange: #FF8C42;
    --orange-light: #FFB17A;
    --orange-bg: #FFF4E6;
    --navy: #1a3a5c;
    --navy-dark: #0f2540;
    --navy-light: #2c5282;
    --white: #ffffff;
    --cream: #FAF5EE;
    --gray-light: #f5f5f5;
    --gray: #888888;
    --gray-dark: #444444;
    --text: #2d2d2d;
    --shadow-sm: 0 2px 8px rgba(26, 58, 92, 0.08);
    --shadow-md: 0 4px 16px rgba(26, 58, 92, 0.12);
    --shadow-lg: 0 8px 32px rgba(26, 58, 92, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body[dir="rtl"] {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
}

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

a { color: var(--navy); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--orange); }

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

/* ============ Header ============ */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: var(--navy);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
    text-align: center;
}

.header-top a { color: var(--white); }

.header-main {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    border: 2px solid var(--navy);
}

.logo-text { letter-spacing: -0.5px; }

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}
.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--navy);
    border-radius: 3px;
    transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Navigation */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    padding: 80px 24px 24px;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 99;
}

body[dir="rtl"] .nav-menu {
    right: auto;
    left: -100%;
}

.nav-menu.active { right: 0; }
body[dir="rtl"] .nav-menu.active { left: 0; }

.nav-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-menu a {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--navy);
    font-size: 16px;
}

.nav-menu a:hover, .nav-menu a.active {
    background: var(--orange-bg);
    color: var(--orange);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switch {
    background: var(--orange-bg);
    color: var(--navy);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.cart-icon {
    position: relative;
    background: var(--navy);
    color: var(--white);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-icon:hover { background: var(--navy-dark); color: var(--white); }

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--orange);
    color: var(--white);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

body[dir="rtl"] .cart-badge { right: auto; left: -6px; }

/* ============ Hero ============ */
.hero {
    background: linear-gradient(135deg, var(--orange-bg) 0%, var(--cream) 100%);
    padding: 50px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--orange);
    border-radius: 50%;
    opacity: 0.15;
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 36px;
    color: var(--navy);
    margin-bottom: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    color: var(--gray-dark);
    font-size: 17px;
    margin-bottom: 28px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    line-height: 1.4;
}

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

.btn-secondary {
    background: var(--navy);
    color: var(--white);
}
.btn-secondary:hover {
    background: var(--orange);
    color: var(--white);
    transform: translateY(-2px);
}

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

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }

/* ============ Sections ============ */
.section {
    padding: 50px 0;
}

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

.section-title {
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 8px;
    font-weight: 700;
}

.section-subtitle {
    color: var(--gray);
    font-size: 15px;
}

/* ============ Products Grid ============ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    aspect-ratio: 1;
    background: var(--orange-bg);
    overflow: hidden;
    position: relative;
}

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

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--orange);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
}

body[dir="rtl"] .product-badge { left: auto; right: 10px; }

.product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: var(--orange);
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0 12px;
}

.product-price small {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 13px;
    font-weight: 400;
    margin-left: 6px;
}

.product-card .btn {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* ============ Product Detail ============ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0;
}

.product-detail-image {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: var(--shadow-sm);
}

.product-detail-info h1 {
    font-size: 26px;
    color: var(--navy);
    margin-bottom: 8px;
}

.product-detail-price {
    color: var(--orange);
    font-size: 28px;
    font-weight: 800;
    margin: 12px 0;
}

.product-detail-desc {
    color: var(--gray-dark);
    margin: 16px 0;
    line-height: 1.7;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 16px 0;
    border: 2px solid var(--navy);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    color: var(--navy);
    font-weight: 700;
}

.qty-btn:hover { background: var(--orange-bg); }

.qty-input {
    width: 50px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 2px solid var(--navy);
    border-right: 2px solid var(--navy);
    font-size: 16px;
    font-weight: 600;
}

.stock-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stock-in { background: #d1fae5; color: #065f46; }
.stock-out { background: #fee2e2; color: #991b1b; }

/* ============ Cart ============ */
.cart-table { width: 100%; }
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px;
    padding: 14px;
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--orange-bg);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-name {
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--orange);
    font-weight: 700;
    font-size: 15px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cart-item .quantity-selector { margin: 4px 0; }
.cart-item .qty-btn { width: 30px; height: 30px; font-size: 14px; }
.cart-item .qty-input { width: 40px; height: 30px; font-size: 14px; }

.remove-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
}

.cart-summary {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-top: 16px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--gray-dark);
}

.cart-summary-row.total {
    border-top: 2px solid var(--orange-bg);
    padding-top: 14px;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}
.empty-state h3 {
    color: var(--navy);
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* ============ Forms ============ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}

.form-label .required { color: #dc2626; }

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231a3a5c'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

body[dir="rtl"] select.form-control {
    background-position: left 12px center;
    padding-right: 14px;
    padding-left: 36px;
}

/* Payment methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover { border-color: var(--orange-light); }

.payment-option.selected {
    border-color: var(--orange);
    background: var(--orange-bg);
}

.payment-option input { margin: 0; }

.payment-option-icon {
    font-size: 22px;
    color: var(--navy);
}

.payment-option-text {
    flex: 1;
}

.payment-option-title {
    font-weight: 600;
    color: var(--navy);
    font-size: 15px;
}

.payment-option-desc {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}

/* ============ Alert ============ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.alert-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info { background: var(--orange-bg); color: var(--navy); border-left: 4px solid var(--orange); }

body[dir="rtl"] .alert {
    border-left: none;
    border-right: 4px solid;
}
body[dir="rtl"] .alert-success { border-right-color: #10b981; }
body[dir="rtl"] .alert-danger { border-right-color: #dc2626; }
body[dir="rtl"] .alert-warning { border-right-color: #f59e0b; }
body[dir="rtl"] .alert-info { border-right-color: var(--orange); }

/* ============ Features ============ */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.feature-card {
    background: var(--white);
    padding: 24px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--orange-bg);
    color: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 14px;
}

.feature-card h3 {
    color: var(--navy);
    margin-bottom: 8px;
    font-size: 17px;
}

.feature-card p {
    color: var(--gray);
    font-size: 14px;
}

/* ============ Footer ============ */
.site-footer {
    background: var(--navy);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-col h4 {
    color: var(--orange);
    margin-bottom: 14px;
    font-size: 17px;
}

.footer-col p { color: rgba(255,255,255,0.8); font-size: 14px; }

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.footer-col ul a:hover { color: var(--orange); }

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

.social-link {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.social-link:hover { background: var(--orange); color: var(--white); }

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

/* ============ Order Success ============ */
.order-success {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 24px auto;
    max-width: 600px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.order-info-box {
    background: var(--orange-bg);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    text-align: left;
}

body[dir="rtl"] .order-info-box { text-align: right; }

.order-info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.order-info-row strong { color: var(--navy); }

/* ============ Page Title ============ */
.page-header {
    background: linear-gradient(135deg, var(--orange-bg), var(--cream));
    padding: 30px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--navy);
    font-size: 28px;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--gray);
    font-size: 14px;
}

/* ============ About ============ */
.about-content {
    background: var(--white);
    padding: 24px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.about-content h2 {
    color: var(--navy);
    margin-bottom: 14px;
    font-size: 22px;
}

.about-content p {
    color: var(--gray-dark);
    margin-bottom: 12px;
    line-height: 1.8;
}

/* ============ Status Badges ============ */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-processing { background: #ede9fe; color: #5b21b6; }
.status-shipped { background: #cffafe; color: #0e7490; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-paid { background: #d1fae5; color: #065f46; }
.status-failed { background: #fee2e2; color: #991b1b; }

/* ============ Responsive: Tablet ============ */
@media (min-width: 600px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    .hero h1 { font-size: 44px; }
    .section-title { font-size: 32px; }
}

/* ============ Responsive: Desktop ============ */
@media (min-width: 900px) {
    .menu-toggle { display: none; }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        overflow: visible;
    }
    
    .nav-menu ul {
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }
    
    .nav-menu a {
        padding: 8px 14px;
        font-size: 15px;
    }
    
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    
    .product-detail {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .checkout-grid {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 24px;
    }
    
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
    
    .container { padding: 0 24px; }
    
    .section { padding: 70px 0; }
    
    .hero { padding: 80px 0 100px; }
    .hero h1 { font-size: 52px; }
}

/* ============ Print Styles ============ */
@media print {
    .site-header, .site-footer, .no-print { display: none !important; }
    body { background: white; }
    .invoice { padding: 0; box-shadow: none; }
}

/* ============ WhatsApp Float ============ */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: var(--transition);
}

body[dir="rtl"] .whatsapp-float { right: auto; left: 20px; }

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-2 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
