/* ════════════════════════════
   PRODUCT PAGES – shared styles
════════════════════════════ */

/* ── Page header ── */
.products-page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8e8e8;
    animation: fadeUp 0.7s ease both;
}

/* ── Product group title (Doors: Entrance / Garage) ── */
.product-group {
    margin-bottom: 3rem;
}

.product-group-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: #111;
    margin: 0 0 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #e8e8e8;
}

/* ── Product grid ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ── Product card ── */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #ebebeb;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.13);
}

.product-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #242424 0%, #181818 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: background 0.3s ease;
}

.product-card:hover .product-placeholder {
    background: linear-gradient(135deg, #2e2e2e 0%, #222 100%);
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover img { transform: scale(1.04); }

.product-card-name {
    font-family: 'Barlow', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    padding: 0.9rem 1rem 1rem;
    margin: 0;
}

/* ── Gallery pages (fitness / automation / other) ── */
.product-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.gallery-item {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #242424 0%, #181818 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.04); }

.product-page-desc {
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.85;
    color: #555;
    max-width: 740px;
    margin: 0 0 2.5rem;
}

/* ── Other products: named sections ── */
.other-section {
    margin-bottom: 3rem;
    scroll-margin-top: 1rem;
}

.other-section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 0.04em;
    color: #111;
    margin: 0 0 0.6rem;
}

.other-section-desc {
    font-family: 'Barlow', sans-serif;
    font-size: 0.93rem;
    font-weight: 300;
    line-height: 1.75;
    color: #666;
    margin: 0 0 1rem;
    max-width: 640px;
}

/* ── Coming soon banner ── */
.coming-soon-banner {
    width: 100%;
    padding: 4rem 2rem;
    border-radius: 10px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coming-soon-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.4rem;
    letter-spacing: 0.12em;
    color: #aaa;
}

[data-theme="dark"] .coming-soon-banner { border-color: #333; }
[data-theme="dark"] .coming-soon-text { color: #555; }

/* ════════════════════════════
   PRODUCT MODAL
════════════════════════════ */
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.product-modal.open {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 820px;
    width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
    transform: scale(0.95);
    transition: transform 0.25s ease;
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.25) transparent;
}

.modal-box::-webkit-scrollbar {
    width: 6px;
}
.modal-box::-webkit-scrollbar-track {
    background: transparent;
}
.modal-box::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}
.modal-box::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.35);
}

.product-modal.open .modal-box { transform: scale(1); }

.modal-close-btn {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.1);
    color: #333;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close-btn:hover { background: rgba(0,0,0,0.2); }

/* Main image area */
.modal-img-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 62vh;
    background: #111;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img-area img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: none;
}

.modal-img-placeholder {
    font-size: 5rem;
    opacity: 0.2;
}

.modal-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    color: #111;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}

.modal-gallery-btn:hover { background: #fff; }
.modal-gallery-btn.prev { left: 0.8rem; }
.modal-gallery-btn.next { right: 0.8rem; }

/* Thumbnails strip */
.modal-thumbs-strip {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    overflow-x: auto;
    background: #f5f5f5;
    min-height: 3.8rem;
    -webkit-overflow-scrolling: touch;
}

.modal-thumb {
    width: 3.8rem;
    height: 2.9rem;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.75rem;
    font-family: 'Barlow', sans-serif;
    overflow: hidden;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}

.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumb.active { border-color: #ff6a00; opacity: 1; }

/* Info */
.modal-info {
    padding: 1.2rem 1.5rem 1.6rem;
}

.modal-product-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.9rem;
    letter-spacing: 0.03em;
    color: #111;
    margin: 0 0 0.5rem;
}

.modal-product-desc {
    font-family: 'Barlow', sans-serif;
    font-size: 0.93rem;
    font-weight: 300;
    line-height: 1.75;
    color: #666;
    margin: 0;
}

/* ── Dark mode ── */
[data-theme="dark"] .products-page-header { border-bottom-color: #2a2a2a; }
[data-theme="dark"] .product-group-title { color: #f0ece4; border-bottom-color: #2a2a2a; }
[data-theme="dark"] .product-card { background: #1e1e1e; border-color: #2a2a2a; box-shadow: 0 2px 14px rgba(0,0,0,0.3); }
[data-theme="dark"] .product-card:hover { box-shadow: 0 10px 32px rgba(0,0,0,0.5); }
[data-theme="dark"] .product-card-name { color: #e0e0e0; }
[data-theme="dark"] .product-page-desc { color: #888; }
[data-theme="dark"] .other-section-title { color: #f0ece4; }
[data-theme="dark"] .other-section-desc { color: #888; }
[data-theme="dark"] .gallery-item { background: linear-gradient(135deg, #1e1e1e 0%, #161616 100%); }

[data-theme="dark"] .modal-box { background: #1e1e1e; }
[data-theme="dark"] .modal-close-btn { background: rgba(255,255,255,0.1); color: #ccc; }
[data-theme="dark"] .modal-close-btn:hover { background: rgba(255,255,255,0.18); }
[data-theme="dark"] .modal-thumbs-strip { background: #151515; }
[data-theme="dark"] .modal-product-title { color: #f0ece4; }
[data-theme="dark"] .modal-product-desc { color: #888; }
[data-theme="dark"] .modal-gallery-btn { background: rgba(40,40,40,0.92); color: #ccc; }
[data-theme="dark"] .modal-gallery-btn:hover { background: #333; }

/* ── Mobile ── */
@media (max-width: 900px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .product-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .products-grid { grid-template-columns: 1fr; }
    .product-gallery-grid { grid-template-columns: 1fr; }
    .modal-box { max-height: 96vh; border-radius: 10px; }
}
