/* MP10 - RTL E-commerce */

/* Fonts and Base */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #09637E;
    --primary-hover: #088395;
    --secondary: #7AB2B2;
    --success: #25D366;
    --text-dark: #333;
    --text-light: #666;
    --text-lighter: #767676;
    --bg-light: #EBF4F6;
    --border: #ddd;
    --border-light: #eee;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);

    /* Product detail palette */
    --color-primary: #09637E;
    --color-secondary: #088395;
    --color-accent: #7AB2B2;
    --color-light: #EBF4F6;

    /* ─────────────────────────────────────────────────────────────
       HEADER BACKGROUND COLOR
       To change: edit --header-bg value below.
       Example: --header-bg: linear-gradient(135deg, #d9534f 0%, #c9302c 100%);
                --header-bg: #09637E;
       ───────────────────────────────────────────────────────────── */
    --header-bg: #088395;
}

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

body {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    color: var(--text-dark);
    background: #EBF4F6;
}

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

/* ─── Header ─────────────────────────────────────────────────── */

header {
    background: var(--header-bg);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header h1 a:hover {
    opacity: 0.9;
}

header .tagline {
    font-size: 1.15rem;
    font-weight: 600;
    opacity: 1;
    margin-top: 6px;
}

header nav {
    display: flex;
    gap: 5px;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
    font-weight: 500;
}

header nav a:hover {
    background: rgba(255,255,255,0.2);
}

/* ─── Main / Typography ──────────────────────────────────────── */

main {
    min-height: 60vh;
    padding: 2rem 0;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
}

/* ─── Buttons ────────────────────────────────────────────────── */

.btn, .button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

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

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

.btn-secondary:hover {
    background: #46b8da;
}

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

.btn-success:hover {
    background: #20BA5A;
}

/* ─── Products Grid ──────────────────────────────────────────── */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 2rem;
}

.product-card {
    background: #EBF4F6;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

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

.product-card img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #EBF4F6;
}

.product-card .content {
    padding: 16px;
}

.product-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.product-card .sku {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
}

.product-card .price {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 12px 0;
}

.product-card .min-qty {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.product-card .btn {
    width: 100%;
    margin-top: 8px;
}

/* תמונה placeholder */
.product-image-placeholder {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #EBF4F6 0%, #7AB2B2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    font-size: 3rem;
}

/* ─── Categories Grid ────────────────────────────────────────── */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.category-card {
    display: block;
    padding: 20px 12px;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid var(--border);
    transition: all 0.3s;
    font-weight: 500;
    font-size: 1rem;
}

.category-card:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ─── Sidebar Layout ─────────────────────────────────────────── */

.content-with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.sidebar {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar ul li:last-child {
    border-bottom: none;
}

.sidebar ul li a {
    text-decoration: none;
    color: var(--text-dark);
    display: block;
    transition: color 0.3s;
}

.sidebar ul li a:hover {
    color: var(--primary);
}

/* ─── WhatsApp Float ─────────────────────────────────────────── */

.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--success);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    background: #20BA5A;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

/* ─── Alerts ─────────────────────────────────────────────────── */

.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
}

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

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

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

/* ─── Footer ─────────────────────────────────────────────────── */

footer {
    background: #2c3e50;
    color: white;
    padding: 2.5rem 0;
    margin-top: 4rem;
}

footer .container {
    text-align: center;
}

footer p {
    margin: 8px 0;
    opacity: 0.9;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* ─── Forms ──────────────────────────────────────────────────── */

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control, input[type="text"], input[type="email"], 
input[type="tel"], input[type="number"], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

textarea {
    resize: vertical;
    min-height: 120px;
}

/* שדות קטנים */
.form-small {
    max-width: 200px;
}

.form-medium {
    max-width: 400px;
}

/* ─────────────────────────────────────────────────────────────
   ORDER FORM WRAPPER - תיקון רוחב טופס הזמנה
   הוסרו ה-padding המיותרים שגרמו לצרות במובייל
   ───────────────────────────────────────────────────────────── */
.order-form-wrapper {
    max-width: 700px;
    margin: 40px auto;
    padding: 0;
}

.order-form-box {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ─── Contact Box ────────────────────────────────────────────── */

.contact-box {
    text-align: center;
    margin: 40px 0;
    padding: 40px;
    background: var(--bg-light);
    border-radius: 12px;
}

.contact-box h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.contact-box p {
    font-size: 1.15rem;
    margin-bottom: 24px;
}

.contact-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-buttons a {
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

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

.contact-buttons .btn-whatsapp:hover {
    background: #20BA5A;
}

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

.contact-buttons .btn-phone:hover {
    background: var(--primary-hover);
}

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

.contact-buttons .btn-message:hover {
    background: #46b8da;
}

/* ─── Product Detail Page ────────────────────────────────────── */

.product-container {
    margin-left: -20px;
    margin-right: -20px;
    padding: 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0;
    transition: background 0.3s;
    float: left;
    position: relative;
    z-index: 10;
}

.back-button:hover {
    background: var(--color-secondary);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 30px;
}

.product-gallery {
    position: static;
    top: auto;
    height: auto;
    width: 100%;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
    background: #f8f9fa;
    padding: 0;
    cursor: zoom-in;
    margin-bottom: 0;
    display: block;
}

.main-image--no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #7f8c8d;
    font-size: 1.2em;
    cursor: default;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.3s;
}

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

.thumbnail:hover {
    border-color: var(--color-secondary);
}

.product-info {
    padding: 20px;
}

.category-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--color-light);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-title {
    margin: 0 0 20px 0;
    font-size: 2em;
    color: var(--color-primary);
    font-weight: 700;
}

.product-description {
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--color-light);
    border-right: 4px solid var(--color-accent);
    border-radius: 6px;
    line-height: 1.8;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.price-table thead {
    background: var(--color-light);
}

.price-table th {
    padding: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-accent);
}

.price-table td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.price-value {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 1.3em;
}

.branding-value {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 1.1em;
}

.notice-box {
    background: #fff9e6;
    border: 1px solid #ffd700;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    text-align: center;
}

.notice-title {
    margin: 0 0 6px 0;
    color: #856404;
    font-size: 1em;
    font-weight: 600;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #856404;
}

.notice-list li {
    padding: 5px 0;
}

.quote-button {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 700;
    transition: transform 0.2s;
}

.quote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 99, 126, 0.4);
}

/* ─── Image Modal ────────────────────────────────────────────── */

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-image {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ─── Quote Form ─────────────────────────────────────────────── */

.quote-form-outer {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

.quote-form-inner {
    background: white;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quote-form-title {
    text-align: center;
    color: var(--color-primary);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ─── Form Fields (detail page) ──────────────────────────────── */

.form-field-block {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-primary);
}

.field-label--sm {
    font-size: 0.95em;
    margin-bottom: 5px;
}

.field-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
}

.field-input--rtl {
    direction: rtl;
    text-align: right;
}

.field-hint {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 5px;
    display: block;
}

.field-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    direction: rtl;
    text-align: right;
    font-family: 'Heebo', Arial, sans-serif;
    resize: both;
    min-height: 100px;
}

.field-file {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

/* ─── Form Grids ─────────────────────────────────────────────── */

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

/* ─── Branding Toggle ────────────────────────────────────────── */

.branding-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
}

.branding-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.branding-label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.branding-label-sub {
    font-size: 0.85rem;
}

/* ─── Branding Section ───────────────────────────────────────── */

.branding-section {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px dashed var(--color-accent);
    border-radius: 8px;
}

.branding-section--hidden {
    display: none;
}

/* ─── Form Divider ───────────────────────────────────────────── */

.form-divider {
    margin: 30px 0;
    border: 0;
    border-top: 2px solid var(--color-light);
}

/* ─── Form Section Title ─────────────────────────────────────── */

.form-section-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* ─── Consent Box ────────────────────────────────────────────── */

.consent-box {
    margin: 20px 0;
    padding: 15px;
    background: var(--color-light);
    border-radius: 8px;
    border: 2px solid var(--color-accent);
}

.consent-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
    margin: 0;
}

.consent-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}

.consent-text {
    font-weight: 500;
    color: var(--color-primary);
    font-size: 1em;
}

.consent-hint {
    display: block;
    margin-top: 8px;
    margin-right: 34px;
    color: #7f8c8d;
    font-size: 0.85em;
}

/* ─── Form Action Buttons ────────────────────────────────────── */

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    font-family: 'Heebo', Arial, sans-serif;
}

.btn-cancel {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: #95a5a6;
    color: white;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Contact Section (detail page bottom) ───────────────────── */

.contact-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--color-light);
    border-radius: 12px;
    text-align: center;
}

.contact-section-title {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.contact-section-text {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 1.05em;
}

.contact-section-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05em;
}

.contact-btn--whatsapp {
    background: #25D366;
    color: white;
}

.contact-btn--phone {
    background: #e74c3c;
    color: white;
}

.contact-btn--email {
    background: #3498db;
    color: white;
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 12px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    header nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

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

    /* 2 categories per row on mobile */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        padding: 18px 10px;
        font-size: 0.9rem;
    }

    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .contact-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .contact-buttons a {
        width: 100%;
        text-align: center;
    }

    /* Product detail */
    .main-image {
        height: 280px;
    }

    .price-table {
        font-size: 0.9em;
    }

    .price-table th,
    .price-table td {
        padding: 10px 8px;
    }

    /* Quote form grids collapse */
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

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

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

    /* הגדלת תמונת מוצר במובייל ב-10% */
    .product-card img,
    .product-image-placeholder {
        height: 264px; /* 240px * 1.10 */
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
}

/* ===== נגישות - Focus Styles ===== */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid #09637E;
    outline-offset: 2px;
}

/* גודל טקסט מינימלי לנגישות */
body {
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* הסתרה נגישה */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
