/* ============================================
   HORIZON WINDOWS - Shared Components
   ============================================ */

/* --- File Upload Area (Contact Form) --- */
.file-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    overflow: hidden;
}
.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--color-accent);
    background: rgba(200,169,126,0.05);
}
.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
}
.file-upload-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}
.file-upload-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
}
.file-list:not(:empty) {
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--color-border);
}
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}
.file-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.file-item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200,169,126,0.1);
    border-radius: 4px;
    color: var(--color-accent);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}
.file-item-name {
    font-size: 0.8rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-item-size {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}
.file-item-remove {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
    font-size: 1rem;
    line-height: 1;
}
.file-item-remove:hover {
    color: #e74c3c;
    background: rgba(231,76,60,0.1);
}

/* --- Page Header (for inner pages) --- */
.page-header {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ffffff; /* always white — dark photo overlay behind */
    padding: calc(var(--nav-height) + 2rem) 2rem 4rem;
    background: var(--color-bg);
}
.page-header-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
.page-header-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0.8), rgba(10,10,10,0.95));
}
.page-header-content {
    position: relative; z-index: 2; text-align: center; max-width: 700px;
}
.page-header-content .breadcrumb {
    font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.breadcrumb a { color: rgba(255,255,255,0.65); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb .sep { color: rgba(255,255,255,0.35); }
.page-header-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400; line-height: 1.1; margin-bottom: 1rem;
    color: #ffffff;
}
.page-header-content p {
    font-size: 1.1rem; color: rgba(255,255,255,0.7); line-height: 1.7;
}

/* --- Product Detail Layout --- */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem;
    align-items: start;
}
.product-gallery {
    position: sticky; top: calc(var(--nav-height) + 2rem);
}
.gallery-main {
    width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-lg);
    overflow: hidden; margin-bottom: 1rem; background: var(--color-surface);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.75rem; }
.gallery-thumb {
    width: 80px; height: 60px; border-radius: var(--radius-sm);
    overflow: hidden; border: 2px solid transparent;
    transition: border-color var(--transition); cursor: pointer;
}
.gallery-thumb.active { border-color: var(--color-accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info h2 {
    font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 0.5rem;
}
.product-info .system-tag {
    font-size: 0.75rem; font-weight: 600; color: var(--color-accent);
    letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem; display: block;
}
.product-info .product-desc {
    font-size: 1.05rem; color: var(--color-text-secondary); line-height: 1.8;
    margin-bottom: 2rem;
}

/* Spec Grid */
.spec-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    margin-bottom: 2rem;
}
.spec-card {
    padding: 1.25rem; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: var(--radius-md);
    text-align: center;
}
.spec-card .sc-value {
    font-size: 1.5rem; font-weight: 700; color: var(--color-accent);
    display: block;
}
.spec-card .sc-label {
    font-size: 0.7rem; color: var(--color-text-muted); text-transform: uppercase;
    letter-spacing: 0.08em; margin-top: 0.25rem;
}

/* Features List */
.features-list {
    list-style: none; margin: 2rem 0;
}
.features-list li {
    padding: 0.6rem 0 0.6rem 1.75rem;
    position: relative; color: var(--color-text-secondary);
    font-size: 0.95rem; line-height: 1.6;
}
.features-list li::before {
    content: '';
    position: absolute; left: 0; top: 0.9rem;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--color-accent);
}

/* Performance Table */
.perf-table {
    width: 100%; border-collapse: collapse; margin: 2rem 0;
}
.perf-table th, .perf-table td {
    padding: 0.75rem 1rem; text-align: left; font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border);
}
.perf-table th {
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--color-text-muted);
}
.perf-table td { color: var(--color-text-secondary); }
.perf-table td:last-child { color: var(--color-accent); font-weight: 600; }

/* --- Window Type Cards (for category pages) --- */
.window-type-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem; max-width: var(--max-width); margin: 0 auto; padding: 0 2rem;
}
.window-type-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
}
.window-type-card:hover {
    border-color: rgba(200,169,126,0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.wtc-image { height: 280px; overflow: hidden; position: relative; }
.wtc-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s;
}
.window-type-card:hover .wtc-image img { transform: scale(1.05); }
.wtc-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
}
.wtc-content { padding: 2rem; }
.wtc-content h3 {
    font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem;
}
.wtc-content p {
    font-size: 0.9rem; color: var(--color-text-secondary); line-height: 1.7;
    margin-bottom: 1.25rem;
}
.wtc-specs {
    display: flex; gap: 1.5rem; padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
.wtc-spec {
    text-align: center;
}
.wtc-spec-val {
    font-size: 1.1rem; font-weight: 700; color: var(--color-accent);
    display: block;
}
.wtc-spec-label {
    font-size: 0.65rem; color: var(--color-text-muted);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.wtc-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    margin-top: 1.25rem; font-size: 0.85rem; font-weight: 600;
    color: var(--color-accent); transition: gap var(--transition);
}
.wtc-link:hover { gap: 0.8rem; }

/* --- Content Sections for Inner Pages --- */
.content-section {
    padding: 5rem 0;
}
.content-section.alt-bg {
    background: var(--color-surface);
}
.content-section.light-bg {
    background: var(--color-light-bg);
    color: var(--color-text);
}
.content-section.light-bg h2, .content-section.light-bg h3 { color: var(--color-text); }
.content-section.light-bg p { color: var(--color-text-secondary); }
.content-section.light-bg .section-tag { color: var(--color-accent-dark); border-color: var(--color-accent-dark); }

.content-two-col {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
    max-width: var(--max-width); margin: 0 auto; padding: 0 2rem;
    align-items: center;
}
.content-two-col.reverse { direction: rtl; }
.content-two-col.reverse > * { direction: ltr; }
.content-image {
    border-radius: var(--radius-lg); overflow: hidden;
    aspect-ratio: 4/3;
}
.content-image img { width: 100%; height: 100%; object-fit: cover; }
.content-text h2 {
    font-family: var(--font-display); font-size: 2rem;
    line-height: 1.2; margin-bottom: 1rem;
}
.content-text p {
    font-size: 1rem; color: var(--color-text-secondary); line-height: 1.8;
    margin-bottom: 1rem;
}

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
    padding: 4rem 2rem;
    text-align: center;
    border-radius: var(--radius-xl);
    max-width: var(--max-width);
    margin: 0 auto 4rem;
}
.cta-banner h2 {
    font-family: var(--font-display); font-size: 2.5rem;
    color: var(--color-bg); margin-bottom: 1rem;
}
.cta-banner p { color: rgba(10,10,10,0.7); font-size: 1.1rem; margin-bottom: 2rem; }
.cta-banner .btn { background: var(--color-bg); color: var(--color-text); }
.cta-banner .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }

/* --- Explorer 3D Product Viewer --- */
.explorer-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    perspective-origin: 50% 45%;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0d0d0d 70%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.explorer-stage:active { cursor: grabbing; }

.explorer-product {
    --zoom: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    will-change: transform;
    transition: opacity 0.3s ease;
}
.explorer-product img {
    max-width: min(85%, 500px);
    max-height: 80%;
    object-fit: contain;
    transform: scale(var(--zoom));
    transition: transform 0.15s ease-out;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
    pointer-events: none;
}

/* Ground shadow under product */
.explorer-shadow {
    position: absolute;
    bottom: 12%;
    left: 50%;
    width: 50%;
    height: 40px;
    margin-left: -25%;
    background: radial-gradient(ellipse, rgba(0,0,0,0.5) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Drag hint */
.explorer-drag-hint {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
    transition: opacity 0.5s;
}
.explorer-view-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    color: var(--color-accent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Lightbox */
.explorer-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.explorer-lightbox.active {
    opacity: 1;
    pointer-events: all;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(10px);
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}
.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* --- Responsive for Inner Pages --- */
@media (max-width: 1024px) {
    .product-detail-grid { grid-template-columns: 1fr; }
    .product-gallery { position: static; }
    .content-two-col { grid-template-columns: 1fr; }
    .window-type-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .spec-grid { grid-template-columns: 1fr 1fr; }
    .page-header { min-height: 40vh; }
}
