/* ============================================
   SONOPACK - DOMES MODULE STYLES
   ============================================ */

/* --- Hero Section --- */
.domes-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.domes-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/dome-pattern.svg');
    background-size: cover;
    opacity: 0.05;
    animation: subtle-drift 30s ease-in-out infinite;
}

@keyframes subtle-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.05); }
}

.domes-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    color: var(--light);
}

.domes-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.domes-hero .subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.domes-hero .description {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Filters Bar --- */
.filters-bar {
    background: var(--light);
    border-bottom: 2px solid var(--gray);
    padding: 1.5rem 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filters-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 1rem;
    background: var(--gray);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.filters-header:hover {
    background: #DDDDDD;
}

.filters-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    user-select: none;
}

.filters-toggle {
    background: var(--primary);
    color: var(--light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.filters-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.filters-toggle::after {
    content: '▼';
    font-weight: 700;
}

.filters-toggle.expanded::after {
    content: '▲';
    font-weight: 700;
}

.filters-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    padding: 0.6rem 1rem;
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    font-size: 1rem;
    background: white;
    transition: var(--transition);
    min-width: 160px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-filter,
.btn-reset {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-reset {
    background: var(--gray);
    color: var(--text);
}

.btn-reset:hover {
    background: var(--gray-dark);
    color: var(--light);
}

/* --- Comparator Toggle --- */
.comparator-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.btn-compare {
    background: var(--secondary);
    color: var(--light);
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,78,137,0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-compare:hover {
    background: #003a6a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,78,137,0.5);
}

.btn-compare .badge {
    background: var(--primary);
    color: var(--light);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

/* --- Dome Cards Grid --- */
.domes-grid {
    padding: 3rem 0;
}

.domes-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.dome-card {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.dome-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.dome-card.selected {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.dome-card-header {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.dome-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dome-card:hover .dome-card-image {
    transform: scale(1.1);
}

.dome-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--light);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dome-card-checkbox {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
}

.dome-card-body {
    padding: 1.5rem;
}

.dome-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.dome-card .tagline {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.dome-card .description {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.dome-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--gray);
    border-radius: 8px;
}

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

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-dark);
    margin-bottom: 0.25rem;
}

.spec-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.spec-unit {
    font-size: 0.875rem;
    font-weight: 400;
}

.dome-card-footer {
    display: flex;
    gap: 0.75rem;
}

.btn-details,
.btn-add-compare {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-details:hover {
    background: var(--primary-dark);
}

.btn-add-compare {
    background: var(--light);
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-add-compare:hover {
    background: var(--secondary);
    color: var(--light);
}

/* --- Comparator Modal --- */
.comparator-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
}

.comparator-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.comparator-content {
    background: var(--light);
    border-radius: var(--radius);
    width: 100%;
    max-width: 1400px;
    position: relative;
    margin: 2rem 0;
}

.comparator-header {
    padding: 2rem;
    border-bottom: 2px solid var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparator-header h2 {
    font-size: 2rem;
    color: var(--dark);
}

.btn-close-comparator {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-dark);
    transition: var(--transition);
}

.btn-close-comparator:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.comparator-table {
    width: 100%;
    border-collapse: collapse;
}

.comparator-table th,
.comparator-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

.comparator-table th {
    background: var(--gray);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.comparator-table tr:hover {
    background: rgba(255, 107, 53, 0.05);
}

.compare-image {
    width: 100%;
    max-width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

/* --- Individual Dome Page --- */
.dome-detail-hero {
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.dome-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26,26,46,0.95) 0%, transparent 60%);
}

.dome-detail-hero-content {
    position: relative;
    z-index: 2;
    color: var(--light);
    padding: 3rem 0;
}

.dome-detail-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dome-detail-specs {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.detail-spec {
    text-align: center;
}

.detail-spec-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.detail-spec-label {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.dome-detail-content {
    padding: 4rem 0;
}

.dome-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 3rem 0;
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* --- Deck Presentation --- */
.deck-slide {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.deck-slide.fullscreen-image {
    padding: 0;
    background-size: cover;
    background-position: center;
}

.deck-slide-content {
    max-width: 1200px;
    width: 100%;
}

.deck-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 1000;
}

.deck-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--light);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.deck-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .domes-hero h1 {
        font-size: 2rem;
    }

    .filters-bar {
        padding: 1rem 0;
    }

    .filters-header {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        opacity: 0;
    }

    .filters-container.expanded {
        max-height: 1000px;
        padding-top: 1rem;
        opacity: 1;
    }

    .filter-group select,
    .filter-group input {
        min-width: 100%;
    }

    .domes-cards {
        grid-template-columns: 1fr;
    }

    .comparator-table {
        display: block;
        overflow-x: auto;
    }

    .dome-detail-specs {
        flex-direction: column;
        gap: 1.5rem;
    }

    .comparator-toggle {
        bottom: 1rem;
        right: 1rem;
    }

    .btn-compare {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media print {
    .filters-bar,
    .comparator-toggle,
    .deck-controls,
    .navbar,
    footer {
        display: none !important;
    }

    .deck-slide {
        page-break-after: always;
        min-height: 100vh;
    }
}
