/* CSS Reset & Variables */
:root {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(30, 30, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --brand-transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: #0d0f14;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- BACKGROUND LAYERS --- */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

.image-layer {
    background-image: url('https://storage.googleapis.com/bitly-image-upload/Iq3fkIuNOc8');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.gradient-layer {
    background: radial-gradient(circle at 50% 0%, rgba(20, 30, 50, 0.8) 0%, rgba(9, 11, 15, 0.95) 80%);
}

.glass-layer {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* --- LAYOUT & MAIN --- */
.app-wrapper {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* --- PROFILE HEADER --- */
.profile-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.avatar-ring {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #195FAD, #D75A22);
    box-shadow: 0 8px 32px rgba(25, 95, 173, 0.4);
    margin-bottom: 0.5rem;
}

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #12141c;
}

.profile-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    background: linear-gradient(100deg, #fff, #b3c5e2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- CATALOG SECTION (Hierarchical Accordions) --- */
.catalog-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 1. BRAND ACCORDION */
.brand-item {
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: var(--brand-transition);
}

.brand-header {
    padding: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: var(--brand-transition);
}

.brand-header:active {
    transform: scale(0.98);
}

.brand-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

.brand-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor; /* glow effect based on inline color */
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
}

.expand-icon {
    position: absolute;
    right: 1.25rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: transform 0.4s ease;
}

.brand-item:has(> .accordion-checkbox:checked) {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    background: rgba(40, 42, 50, 0.7);
    border-color: rgba(255,255,255,0.2);
}
.accordion-checkbox:checked ~ .brand-header .expand-icon {
    transform: rotate(180deg);
}

/* Accordion Checkbox Trick */
.accordion-checkbox {
    display: none;
}
.accordion-checkbox:checked ~ .products-wrapper {
    max-height: 2500px; /* Arbitrary large number to allow sliding */
}

/* 2. PRODUCTS WRAPPER */
.products-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.products-container {
    padding: 0 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 3. PRODUCT ACCORDION */
.product-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: var(--brand-transition);
}

.product-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem 2.5rem 1rem 1rem; /* Margem pra não colar no icone */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: var(--brand-transition);
}

.product-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.product-header h3 {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.product-icon {
    position: absolute;
    right: 1rem;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.product-item:has(> .product-checkbox:checked) .product-header {
    background: rgba(255,255,255,0.1);
}
.product-checkbox:checked ~ .product-header .product-icon {
    transform: rotate(180deg);
}

.product-checkbox {
    display: none;
}
.product-checkbox:checked ~ .stores-wrapper {
    max-height: 800px;
}

/* 4. STORES WRAPPER */
.stores-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.stores-container {
    padding: 0.75rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
}

/* 5. STORE BUTTONS */
.store-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    background: rgba(255,255,255,0.08);
    transition: var(--brand-transition);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.store-link::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.4s;
}

.store-link:hover::before {
    left: 100%;
}

.store-link:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.store-link.amazon { color: #f90; border-color: rgba(255, 153, 0, 0.3); }
.store-link.mercado { color: #ffe600; border-color: rgba(255, 230, 0, 0.3); }
.store-link.shopee { color: #ee4d2d; border-color: rgba(238, 77, 45, 0.3); }

/* --- FOOTER --- */
.footer {
    text-align: center;
    padding-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --- ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 400px) {
    .app-wrapper {
        padding: 1.5rem 1rem;
    }
}
