/* === CaritLi - RTL Hebrew E-commerce === */

:root {
    --primary: #d4a574;
    --primary-dark: #b8895c;
    --primary-light: #f0dcc8;
    --secondary: #5c4a3a;
    --accent: #e8c4a0;
    --dark: #2c2c2c;
    --text: #333333;
    --text-light: #666666;
    --light: #f8f5f1;
    --white: #ffffff;
    --border: #e5e5e5;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 5px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font: 'Heebo', 'Arial', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    direction: rtl;
    text-align: right;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
}

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

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

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

/* === HEADER === */
.top-bar {
    background: var(--secondary);
    color: var(--white);
    font-size: 14px;
    padding: 8px 0;
}

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

.top-bar a {
    color: var(--primary-light);
}

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

.header-main {
    background: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
}

.logo span {
    color: var(--primary);
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.main-nav a {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 15px;
    color: var(--text);
}

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

.main-nav .dropdown {
    position: relative;
}

.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    min-width: 200px;
    padding: 10px 0;
    z-index: 100;
}

.main-nav .dropdown:hover .dropdown-menu {
    display: block;
}

.main-nav .dropdown-menu a {
    display: block;
    padding: 8px 20px;
    border-radius: 0;
}

.main-nav .dropdown-menu a:hover {
    background: var(--light);
}

/* Header Cart */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: var(--secondary);
    cursor: pointer;
    padding: 8px;
}

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

.cart-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon {
    font-size: 20px;
    color: var(--secondary);
    cursor: pointer;
    padding: 8px;
}

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

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--secondary);
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--light) 100%);
    padding: 80px 0;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-height: 450px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: var(--font);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212,165,116,0.4);
}

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

.btn-secondary:hover {
    background: #4a3b2d;
    transform: translateY(-2px);
}

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

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

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

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

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-success:hover {
    background: #219a52;
}

/* === SECTIONS === */
.section {
    padding: 60px 0;
}

.section-light {
    background: var(--light);
}

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

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

.section-title p {
    color: var(--text-light);
    font-size: 17px;
}

/* === PRODUCT CARDS === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-card .image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--light);
}

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

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

.product-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.product-card .card-body {
    padding: 18px;
}

.product-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

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

.product-card .price .old-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-right: 8px;
    font-weight: 400;
}

.product-card .card-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.product-card .btn-add-cart {
    flex: 1;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.product-card .btn-add-cart:hover {
    background: var(--primary-dark);
}

/* === CATEGORY CARDS === */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

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

.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;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 25px 20px;
    color: var(--white);
}

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

.category-card p {
    font-size: 14px;
    opacity: 0.85;
}

/* === VIP Section === */
.vip-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #3d2f22 100%);
    color: var(--white);
    padding: 60px 0;
}

.vip-section .section-title h2 {
    color: var(--primary-light);
}

.vip-section .section-title p {
    color: rgba(255,255,255,0.7);
}

.vip-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.vip-item {
    text-align: center;
}

.vip-item img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 10px;
}

.vip-item p {
    font-size: 14px;
    color: var(--primary-light);
}

/* === NEWSLETTER === */
.newsletter {
    background: var(--primary-light);
    padding: 50px 0;
    text-align: center;
}

.newsletter h3 {
    font-size: 24px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.newsletter p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    direction: rtl;
}

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

/* === FOOTER === */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 20px;
}

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

.footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

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

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

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

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

.footer-col p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
}

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

/* === CART PAGE === */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th {
    background: var(--light);
    padding: 15px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

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

.cart-table .product-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-table .qty-input {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: var(--font);
}

.cart-summary {
    background: var(--light);
    padding: 25px;
    border-radius: var(--radius);
    max-width: 400px;
    margin-right: auto;
}

.cart-summary .row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cart-summary .total {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
    border-bottom: none;
}

/* === CHECKOUT === */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    direction: rtl;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* === PRODUCT DETAIL === */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.product-gallery img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-info h1 {
    font-size: 28px;
    color: var(--secondary);
    margin-bottom: 15px;
}

.product-info .price-wrap {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.product-info .description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 25px;
}

.product-info .add-to-cart-form {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
}

.qty-selector button {
    background: var(--light);
    border: none;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    font-family: var(--font);
}

.qty-selector input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-family: var(--font);
}

/* === BREADCRUMB === */
.breadcrumb {
    padding: 15px 0;
    background: var(--light);
    font-size: 14px;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.breadcrumb li::after {
    content: '/';
    margin-right: 8px;
    color: var(--text-light);
}

.breadcrumb li:last-child::after {
    content: '';
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* === ARTICLES === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.article-card .image-wrap {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--light);
}

.article-card .image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card .card-body {
    padding: 20px;
}

.article-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--secondary);
}

.article-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* === ALERTS === */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 14px;
}

.pagination a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* === PAGE HEADER === */
.page-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--light) 100%);
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 34px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-light);
    font-size: 16px;
}

/* === WHATSAPP FLOAT === */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 999;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    transition: var(--transition);
}

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

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}

/* === PAYMENT POPUP === */
.payment-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.payment-overlay.active {
    display: flex;
}

.payment-popup {
    background: var(--white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
}

.payment-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--light);
    border-bottom: 1px solid var(--border);
}

.payment-popup-header h3 {
    font-size: 18px;
    color: var(--secondary);
}

.payment-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.payment-popup iframe {
    width: 100%;
    height: 70vh;
    border: none;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    fill: var(--border);
}

.empty-state h3 {
    font-size: 22px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* === LOADING === */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .products-grid,
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vip-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 30px;
    }

    .products-grid,
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

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

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 15px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-right: 20px;
    }

    .mobile-toggle {
        display: block;
    }

    .cart-table {
        font-size: 14px;
    }

    .cart-table .product-thumb {
        width: 50px;
        height: 50px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .vip-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
