/*
*/

/* ── Shared with events page ─────────────────── */
/* title, perks-row, perk-card, perk-icon, cta-banner are all defined in events.php */
/* This file is loaded after events.php — load order handled by includeHeader("...", "gear") */

main {
    padding-top: 60px;
}

/* ── Background radial (teal-blue variant) ───── */
main::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -20%;
    width: 130vw;
    height: 130vw;
    background: radial-gradient(ellipse at center,
        rgba(59, 130, 246, 0.22) 0%,
        rgba(59, 130, 246, 0.08) 40%,
        transparent 70%);
    pointer-events: none;
    z-index: -1;
}

section.title {
    padding-bottom: 40px;
}

h1.title-text {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

p.title-text {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    
}

/* Filter Section */

.filter-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px 48px;
    margin-top: 20px;
    margin-bottom: 50px;
    padding: 24px 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
}
.filter-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.filter-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    padding-top: 8px; /* Alignment with button text baseline */
    font-weight: 700;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-smooth), transform 0.1s ease;
    font-size: 0.9rem;
    font-weight: 500;
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}
.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}
.filter-btn.active:hover {
    filter: brightness(1.15);
}
.filter-btn-dimmed {
    /* Use filter adjustments instead of pure opacity to fade elements */
    filter: brightness(0.6) contrast(0.85) saturate(0.5);
    opacity: 0.35; 
    
    /* Give it a very snappy hardware transition curve */
    transition: filter 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-in-out !important;
    
    /* Keep clicks disabled on hidden paths */
    pointer-events: none; 
}

@media (max-width: 768px) {
    .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 16px;
        border-radius: 12px;
    }
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .filter-label {
        padding-top: 0;
        text-align: left;
    }
}

/* Gear List Styles */

.gear-grid {
    display: block !important; 
    position: relative;
    margin-top: 40px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.gear-card {
    width: 325px;
    margin: 0px 5px 10px 5px;
    box-sizing: border-box;
}

.gear-card-inner {
    display: flex;
    flex-direction: column;
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.gear-card-inner:hover {
    background: var(--secondary-bg);
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.gear-thumbnail {
    width: 100%;
    height: 180px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gear-thumbnail img {
    max-height: 100%;
    object-fit: contain;
}

.gear-card h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

@media (max-width: 830px) {
    .gear.container {
        margin: 0;
        padding: 0;
    }
    .gear-card {
        width: 400px;
        margin: 0 5px 20px 5px;
    }

    .gear-card:first-child {
        margin-top: 0;
    }
    
    .gear-thumbnail {
        height: 200px;
    }
}

@media (max-width: 550px) {
    .gear-card {
        width: calc(100% - 10px);
    }
}

.gear-brand {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.dept-cat {
    position: absolute;
    width: max-content;
    font-size: 0.8rem;
    background-color: var(--accent-color);
    color: white;
    text-transform: uppercase;
    /* letter-spacing: 1px; */
    padding: 2px 5px;
    border-top-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.gear-specs {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-tag {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.spec-tag span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Gear Form */

.form-group {
    margin-bottom: 10px;
}

/* Item Page Styling */

.item-detail-container {
    padding-top: 150px;
    padding-bottom: 80px;
}

.item-grid { display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: start;
}

/* Gallery Styles */

.gallery-viewer {
    display: flex;
    flex-direction: column;
    gap: 20px;

}
.main-stage { 
    background: #fff;
    border: 1px solid var(--glass-border); 
    border-radius: 12px; 
    padding: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%;
    max-height: 500px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.main-stage img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.3s ease; }
.thumb-strip { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.gallery-thumb { 
    width: 80px; height: 80px; background: #fff; border: 2px solid var(--glass-border); 
    border-radius: 8px; cursor: pointer; flex-shrink: 0; padding: 5px; transition: all 0.2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain;}
.gallery-thumb:hover { border-color: var(--accent-color); }
.gallery-thumb.active { border-color: var(--accent-color); }

.item-info h1 { font-size: 3rem; margin-bottom: 10px; }
.item-brand { color: var(--accent-color); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; margin-bottom: 20px; display: block; }

.item-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.item-meta span {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
}

.item-meta strong {
    color: var(--accent-color);
    margin-right: 5px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.item-price-box { background: rgba(59, 130, 246, 0.1); border-left: 4px solid var(--accent-color); padding: 20px; margin-bottom: 40px; }
.specs-grid { display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px; background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px;
}
.spec-item { border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; }
.spec-label { display: block; font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.spec-value { font-weight: 600; color: var(--text-primary); }

.specs-cont {
    margin-top: 50px;
}

@media (max-width: 992px) { .item-grid { grid-template-columns: 1fr; } }

.no-equipment-msg {
    grid-column: 1 / -1; /* Forces the alert to span the whole width of the grid */
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 20px 0;
}

.no-equipment-msg h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.no-equipment-msg p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.no-equipment-msg i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    display: inline-block;
}