/* ==========================================================================
   SERIES DETAIL SHARED STYLES
   File: css/pages/series-detail.css
   ========================================================================== */

/* --- Hero & Grid --- */
.series-hero { padding: 180px 0 100px; position: relative; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.collection-tag { display: inline-block; font-family: monospace; color: var(--accent); border: 1px solid var(--accent); padding: 5px 10px; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 20px; }
.hero-meta { margin-top: 40px; max-width: 600px; }
.catalog-section { padding: 100px 0; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px 40px; }

/* --- Spec Card --- */
.spec-card { display: block; position: relative; }
.card-visual { width: 100%; aspect-ratio: 1 / 1; background-color: #1a1a1a; overflow: hidden; position: relative; margin-bottom: 25px; border: 1px solid rgba(255,255,255,0.05); }

/* Images */
.card-image { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease; opacity: 0; transform: scale(1.05); z-index: 1; }
.card-image.active { opacity: 1; transform: scale(1); z-index: 2; }

/* --- UI CONTROLS --- */
.ui-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; z-index: 10; outline: none; }
.ui-btn i { font-size: 0.8rem; pointer-events: none; }
.ui-btn:hover { background: #fff; color: #000; border-color: #fff; }
.ui-btn.active-mode { background: var(--accent); border-color: var(--accent); color: #000; }

/* Positions */
.fullscreen-toggle { position: absolute; top: 15px; right: 15px; }
.view-controls { position: absolute; bottom: 15px; right: 15px; display: flex; gap: 10px; z-index: 10; }
.specs-toggle { position: absolute; bottom: 15px; left: 15px; z-index: 10; }

/* --- FULLSCREEN BEHAVIOR --- */
.card-visual:fullscreen .specs-toggle,
.card-visual:-webkit-full-screen .specs-toggle,
.card-visual:-moz-full-screen .specs-toggle,
.card-visual:-ms-fullscreen .specs-toggle,
.card-visual.is-fullscreen-mode .specs-toggle {
    display: none !important;
}

/* --- Text Meta Data --- */
.card-info { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: flex-start; transition: border-color 0.3s ease; }
.spec-card:hover .card-info { border-color: var(--accent); }
.info-main h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 5px 0; color: #fff; }
.finish-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 300; }
.info-code { text-align: right; }
.code-tag { font-family: monospace; font-size: 0.75rem; color: #555; background: #111; padding: 4px 8px; display: block; margin-bottom: 5px; }
.status-indicator { display: block; width: 6px; height: 6px; background-color: #333; border-radius: 50%; margin-left: auto; transition: background-color 0.3s ease; }
.spec-card:hover .status-indicator { background-color: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* --- MODAL SYSTEM --- */
.specs-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 5000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease;
}
.specs-modal.active { opacity: 1; pointer-events: auto; }

.modal-card {
    background: #0a0a0a; border: 1px solid rgba(255,255,255,0.15);
    width: 90%; max-width: 500px;
    padding: 40px; position: relative;
    transform: translateY(20px); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-height: 90vh; /* Safety limit */
    overflow-y: auto; /* Allow internal scrolling if content is long */
}
.specs-modal.active .modal-card { transform: translateY(0); }

.modal-close {
    position: absolute; top: 20px; right: 20px;
    background: transparent; border: none; color: #fff;
    font-size: 1.2rem; cursor: pointer; opacity: 0.5; transition: opacity 0.3s;
    z-index: 10;
}
.modal-close:hover { opacity: 1; color: var(--accent); }

.modal-header { margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; }
.modal-title { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; color: #fff; margin: 0; }
.modal-subtitle { font-family: monospace; color: var(--accent); font-size: 0.8rem; margin-top: 5px; display: block; }

/* Image Wrapper (NEW) */
.modal-image-wrapper {
    margin-bottom: 25px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
}
.spec-detail-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 250px;
    object-fit: cover;
}

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.95rem; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-label { color: #888; width: 40%; font-weight: 400; }
.spec-value { color: #fff; font-weight: 600; text-align: right; }

/* Responsive Grid */
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .product-grid { grid-template-columns: 1fr; gap: 60px; } .series-hero { padding: 140px 0 60px; } }