/* Basic and More Main Styles */

:root {
    /* Color variables */
    --bg-color: #F4E8DF;
    --primary-color: #7A4936;
    --secondary-color: #FFFFFF;
    --text-color: #333333;
    --accent-color: #F0C2B3;
    --border-color: #E5D8D0;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 34px)); /* Bottom nav height + safe area */
    padding-top: calc(20px + env(safe-area-inset-top, 44px)); /* Status bar height + safe area */
}

/* Status bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-top: env(safe-area-inset-top, 0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: var(--bg-color);
}

.status-time {
    font-weight: bold;
}

.status-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.status-signal::before {
    content: "•••";
    letter-spacing: -1px;
}

.status-wifi::before {
    content: "📶";
    font-size: 0.9rem;
}

.status-battery::before {
    content: "🔋";
    font-size: 0.9rem;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-md);
    margin-top: 44px; /* Status bar height */
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--primary-color);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info .greeting {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: -5px;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.user-info .username {
    font-size: 1.2rem;
    font-weight: 600;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Animation classes for user info transitions */
.fade-out {
    opacity: 0;
    transform: translateY(-5px);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.header-actions {
    display: flex;
    gap: var(--spacing-md);
}

.header-actions button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

/* Search bar */
.search-container {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.search-bar {
    display: flex;
    height: 62px;
    padding: 8px 8px 8px 24px;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
    border-radius: 10px;
    border: 1.5px solid rgba(112, 53, 38, 0.05);
    background: rgba(112, 53, 38, 0.10);
}

.search-bar i {
    color: rgba(112, 53, 38, 0.80);
font-feature-settings: 'ss08' on, 'ss09' on;
font-family: Geist;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: normal;
}

.search-bar input {
    flex: 1;
    background: transparent;
    padding: var(--spacing-xs) 0;
}

/* Weekly offer banner */
.weekly-offer {
    margin: 0 var(--spacing-md) var(--spacing-lg);
    background-color: var(--primary-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    color: var(--secondary-color);
    position: relative;
    overflow: hidden;
    min-height: 160px;
}

.offer-bg {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: auto;
    opacity: 0.5;
    object-fit: cover;
    z-index: 0;
}

.offer-timer {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
    
}

.countdown {
    color: var(--Accent, #FFD779);
    font-feature-settings: 'ss08' on, 'ss09' on;
font-family: Geist;
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: normal;
display: inline-flex;
padding: 8px 16px;
justify-content: center;
align-items: center;
gap: 10px;
border-radius: 8px;
border: 1.5px solid #894535;
background: rgba(0, 0, 0, 0.20);
background-blend-mode: soft-light;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.25) inset;
}

.offer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    max-width: 70%;
    position: relative;
    z-index: 1;
}

.offer-btn {
    background: var(--Accent, #FFD779);
    border: 1.5px solid #FFD779;
    border-radius: 10px;
    color: var(--text-color);
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: 500;
    position: relative;
    z-index: 1;
    display: inline-block;
}

/* Section headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-md);
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-arrows {
    display: flex;
    gap: var(--spacing-xs);
}

.nav-arrows button {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.view-all {
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Categories */
.categories {
    margin-bottom: var(--spacing-xl);
}

.category-scroller {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: 0 var(--spacing-md);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-snap-type: x mandatory;
    scroll-padding: var(--spacing-md);
}

.category-scroller::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-item {
    flex: 0 0 auto;
    width: 85px;
    text-align: center;
    scroll-snap-align: start;
}

.category-img {
    width: 85px;
    height: 85px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item p {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product cards */
.popular-products {
    margin-bottom: var(--spacing-xl);
}

.product-scroller {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: 0 var(--spacing-md);
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    scroll-padding: var(--spacing-md);
}

.product-scroller::-webkit-scrollbar {
    display: none;
}

.product-card {
    flex: 0 0 auto;
    width: 160px;
    position: relative;
    scroll-snap-align: start;
}

.product-img {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #FADBCA;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-btn {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.product-info {
    padding: var(--spacing-sm) 0;
    position: relative;
}

.product-info h3 {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 0.9rem;
    font-weight: 600;
}

.product-action {
    position: absolute;
    bottom: var(--spacing-sm);
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Favorite products */
.favorite-products {
    margin-bottom: var(--spacing-xl);
}

/* User Styles (UGC content) */
.user-styles {
    margin-bottom: var(--spacing-xl);
}

.ugc-carousel {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: 0 var(--spacing-md);
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    scroll-padding: var(--spacing-md);
}

.ugc-carousel::-webkit-scrollbar {
    display: none;
}

.ugc-item {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
}

.ugc-content {
    position: relative;
    width: 220px;
    height: 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.ugc-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ugc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ugc-content:hover .ugc-overlay {
    opacity: 1;
}

.ugc-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.view-ugc-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.ugc-username {
    font-size: 0.9rem;
    font-weight: 500;
}

.ugc-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.ugc-play-indicator i {
    font-size: 3rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.ugc-content:hover .ugc-play-indicator {
    opacity: 1;
}

/* Mood Board */
.inspiration-moodboard {
    margin-bottom: var(--spacing-xl);
}

.moodboard-container {
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.moodboard-window {
    position: relative;
    height: auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
}

.moodboard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.hotspot-dot {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background-color: var(--accent-color);
    border: 2px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.hotspot-info {
    position: absolute;
    bottom: 30px;
    left: -75px;
    width: 210px;
    background-color: var(--secondary-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.product-hotspot:hover .hotspot-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hotspot-info img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.hotspot-info h4 {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.hotspot-info p {
    font-size: 0.8rem;
    font-weight: 600;
}

.hotspot-info div {
    flex: 1;
}

.hotspot-link {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-md);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.btn-add-to-looks {
    width: 100%;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: 500;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Seasonal products */
.seasonal-products {
    margin-bottom: var(--spacing-xl);
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-sm) 0;
    padding-bottom: calc(var(--spacing-sm) + env(safe-area-inset-bottom, 0));
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm) 0;
    color: var(--secondary-color);
    opacity: 0.8;
}

.nav-item.active {
    opacity: 1;
}

.nav-item i {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Home indicator */
.home-indicator {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background-color: #fff;
    border-radius: var(--radius-full);
    opacity: 0.7;
    z-index: 1001;
}
