/* Expansion Styles */
:root {
    --hatch-accent: #00f2ff;
    --hatch-accent-soft: rgba(0, 242, 255, 0.1);
    --hatch-bg: rgba(15, 15, 20, 0.7);
}

.theme-sovereign {
    --hatch-accent: #00f2ff;
    --hatch-accent-soft: rgba(0, 242, 255, 0.1);
}

.theme-forge {
    --hatch-accent: #ffb400; /* Amber */
    --hatch-accent-soft: rgba(255, 180, 0, 0.1);
}

.theme-sanctuary {
    --hatch-accent: #00ffcc; /* Frosted Teal */
    --hatch-accent-soft: rgba(0, 255, 204, 0.1);
}

.marketplace-grid {
    position: relative;
    transition: filter 0.5s ease;
}

.marketplace-grid.blurred {
    filter: blur(8px);
    pointer-events: none;
}

/* Hatch Accordion System */
.hatch-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.hatch {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--hatch-bg);
    backdrop-filter: blur(20px);
}

.hatch.active {
    border-color: var(--hatch-accent-soft);
    box-shadow: 0 0 50px var(--hatch-accent-soft);
}

.hatch-header {
    padding: 2rem 3rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.3s ease;
}

.hatch-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hatch-title {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    display: flex;
    items-center: center;
    gap: 1rem;
}

.hatch-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid var(--hatch-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.hatch.active .hatch-indicator {
    transform: rotate(45deg);
    background: var(--hatch-accent);
    color: #000;
}

.hatch-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hatch.active .hatch-content {
    max-height: 2000px; /* Large enough for content */
    padding: 3rem;
}

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

/* Texture Overlays */
.hatch-forge .hatch-content {
    background-image: 
        linear-gradient(rgba(255, 180, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 180, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.hatch-sanctuary .hatch-content {
    background: radial-gradient(circle at top right, rgba(0, 255, 204, 0.05), transparent);
}

/* Product Card Styling */
.product-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 2rem;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--hatch-accent);
    transform: translateY(-5px);
}

/* Existing Overlay Adjustments */
#expansion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#expansion-overlay.active {
    opacity: 1;
}

.expanded-card-content {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: #050505;
    border: 1px solid var(--hatch-accent-soft);
    box-shadow: 0 0 100px var(--hatch-accent-soft);
    display: flex;
    position: relative;
    overflow: hidden;
    border-radius: 40px;
}

.expanded-left-col {
    flex: 2;
    padding: 60px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.expanded-right-col {
    flex: 1;
    padding: 60px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
}

.roadmap-step { 
    margin-bottom: 40px; 
    padding-left: 30px; 
    border-left: 2px solid var(--hatch-accent-soft); 
    position: relative;
}

.roadmap-step::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--hatch-accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--hatch-accent);
}

.addon-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.addon-box:hover {
    border-color: var(--hatch-accent);
    background: rgba(255, 255, 255, 0.05);
}

.checkout-btn {
    background: linear-gradient(135deg, var(--hatch-accent), #7000ff);
    color: #fff;
    padding: 24px;
    border: none;
    font-weight: 900;
    cursor: pointer;
    margin-top: auto;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.checkout-btn:hover { 
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(112, 0, 255, 0.3);
}

#close-expansion {
    position: absolute;
    top: 40px;
    right: 40px;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

#close-expansion:hover {
    color: #fff;
    transform: rotate(90deg);
}
