/* ==========================================================================
   pages.css - עיצוב לעמודים פנימיים (shop, product, contact)
   נטען אחרי main.css ומשתמש באותם משתני צבעים.
   ========================================================================== */


/* ==========================================================================
   1. Page Hero - כותרת עמוד (משותף לכל העמודים הפנימיים)
   ========================================================================== */

.page-hero {
    background-color: var(--color-bg-alt);
    padding: var(--space-lg) 0;
    text-align: center;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.page-hero p {
    color: var(--color-text-soft);
    font-size: 1.1rem;
}

.breadcrumbs {
    padding: var(--space-sm) 0;
    color: var(--color-text-soft);
    font-size: 0.95rem;
}

.breadcrumbs a {
    color: var(--color-text-soft);
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--color-accent);
}

.breadcrumbs .separator {
    margin: 0 var(--space-xs);
    opacity: 0.5;
}


/* ==========================================================================
   2. עמוד החנות
   ========================================================================== */

.shop-section {
    padding: var(--space-lg) 0 var(--space-xl);
}

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


/* ==========================================================================
   3. עמוד מוצר
   ========================================================================== */

.product-page {
    padding: var(--space-md) 0 var(--space-xl);
}

.product-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}


/* --- גלריית תמונות --- */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.gallery-main {
    aspect-ratio: 1 / 1;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-main:hover img {
    transform: scale(1.03);
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xs);
}

.gallery-thumb {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background-color: var(--color-bg-alt);
    transition: var(--transition);
}

.gallery-thumb.active {
    border-color: var(--color-accent);
}

.gallery-thumb:hover {
    border-color: var(--color-accent);
    opacity: 0.9;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* כפתור לצפייה ב-3D מתחת לגלריה */
.view-3d-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 12px;
    background-color: var(--color-accent-2);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.view-3d-toggle:hover {
    background-color: #6a7d5a;
    transform: translateY(-2px);
}


/* --- מידע על המוצר --- */
.product-details h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.product-details .price {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.product-details .full-description {
    color: var(--color-text-soft);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.stock-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.stock-status.in-stock {
    background-color: rgba(122, 143, 106, 0.15);
    color: var(--color-accent-2);
}

.stock-status.out-of-stock {
    background-color: rgba(199, 123, 90, 0.15);
    color: var(--color-accent);
}

/* טבלת מפרט */
.specs-table {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.specs-table h3 {
    font-family: var(--font-heading);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
    font-size: 1.15rem;
}

.specs-table dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-xs) var(--space-md);
}

.specs-table dt {
    color: var(--color-text-soft);
    font-weight: 500;
}

.specs-table dd {
    color: var(--color-text);
    margin: 0;
}

/* תגיות */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.tag {
    background-color: var(--color-bg-alt);
    color: var(--color-text-soft);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* כפתורי הזמנה */
.order-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.btn-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 14px var(--space-md);
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

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

.btn-whatsapp:hover {
    background-color: #1DA851;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-phone {
    background-color: var(--color-accent-2);
    color: white;
}

.btn-phone:hover {
    background-color: #6a7d5a;
    transform: translateY(-2px);
}

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

.btn-form:hover {
    background-color: var(--color-accent);
    color: white;
}

/* בלוק משלוח */
.shipping-info {
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.shipping-info h3 {
    font-family: var(--font-heading);
    margin-bottom: var(--space-sm);
}

.shipping-options {
    display: grid;
    gap: var(--space-sm);
}

.shipping-option {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.shipping-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.shipping-option strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 2px;
}

.shipping-option p {
    color: var(--color-text-soft);
    font-size: 0.95rem;
    margin: 0;
}


/* ==========================================================================
   4. Lightbox + תצוגת 3D
   ========================================================================== */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.lightbox.is-open {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
    top: 20px;
    left: 20px;
}

.lightbox-prev {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* תצוגת model-viewer */
.model-viewer-container {
    display: none;
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 80vh;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.model-viewer-container.is-active {
    display: block;
}

model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: var(--color-bg);
}

.lightbox-mode-toggle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-xs);
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
    border-radius: 24px;
    backdrop-filter: blur(8px);
}

.lightbox-mode-toggle button {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.lightbox-mode-toggle button.active {
    background: var(--color-accent);
}


/* ==========================================================================
   5. עמוד צור קשר
   ========================================================================== */

.contact-page {
    padding: var(--space-lg) 0 var(--space-xl);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-lg);
}

.contact-form-box {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.contact-form-box h2 {
    font-family: var(--font-heading);
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.contact-form .form-row {
    margin-bottom: var(--space-sm);
}

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

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-bg-alt);
    border-radius: var(--radius-sm);
    background-color: var(--color-bg);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(199, 123, 90, 0.1);
}

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

.contact-form-success {
    background-color: var(--color-accent-2);
    color: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 1.05rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-info-block {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.contact-info-block h3 {
    font-family: var(--font-heading);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.contact-detail {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-xs) 0;
    color: var(--color-text-soft);
}

.contact-detail a {
    color: var(--color-text-soft);
    transition: var(--transition);
}

.contact-detail a:hover {
    color: var(--color-accent);
}

.contact-icon {
    font-size: 1.25rem;
}

.contact-social {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.contact-social a {
    flex: 1;
    text-align: center;
    padding: 10px;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: var(--transition);
    min-width: 90px;
}

.contact-social a:hover {
    background-color: var(--color-accent);
    color: white;
}


/* ==========================================================================
   6. רספונסיביות
   ========================================================================== */

@media (max-width: 1024px) {
    .shop-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-layout {
        grid-template-columns: 1fr;
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 1.75rem;
    }
    .shop-section .products-grid {
        grid-template-columns: 1fr;
    }
    .product-details h1 {
        font-size: 1.75rem;
    }
    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
