/* ============================================================
   DESIGN SYSTEM - Soft Pink E-Commerce
   Author: IT Team
   Version: 1.0.0
   ============================================================ */

/* ---- Google Fonts ---- */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap");

/* ---- CSS Variables ---- */
:root {
    /* Colors */
    --color-primary: #f4a7b9;
    --color-primary-light: #fddde6;
    --color-primary-medium: #ee8fa4;
    --color-primary-dark: #d4738a;
    --color-white: #ffffff;
    --color-bg: #fdf8f9;
    --color-bg-section: #f9f0f3;
    --color-bg-card: #ffffff;
    --color-text-dark: #2c1f24;
    --color-text-body: #5a4a50;
    --color-text-muted: #a08990;
    --color-border: #f0dde4;
    --color-badge: #ff6b8a;

    /* Typography */
    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "DM Sans", sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 4px rgba(212, 115, 138, 0.06);
    --shadow-sm: 0 2px 12px rgba(212, 115, 138, 0.1);
    --shadow-md: 0 4px 24px rgba(212, 115, 138, 0.14);
    --shadow-lg: 0 8px 40px rgba(212, 115, 138, 0.18);
    --shadow-nav: 0 -4px 20px rgba(212, 115, 138, 0.12);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Layout */
    --max-width: 430px;
    --nav-height: 72px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-body);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

/* ---- Mobile Container ---- */
.app-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--color-bg);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.06);
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
    background: var(--color-white);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__logo-mark {
    width: 28px;
    height: 28px;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-primary-dark)
    );
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header__logo-mark img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.header__brand-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text-dark);
    letter-spacing: -0.2px;
    line-height: 1;
}

.header__brand-name span {
    color: var(--color-primary-dark);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header__action-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dark);
    font-size: 18px;
    transition:
        background var(--transition-fast),
        color var(--transition-fast);
    position: relative;
}

.header__action-btn:active {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.header__badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--color-badge);
    border-radius: var(--radius-full);
    border: 2px solid white;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
    padding: var(--space-md) var(--space-lg) var(--space-sm);
    background: var(--color-white);
}

.search-bar__inner {
    background: var(--color-bg-section);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    border: 1.5px solid transparent;
    transition: border-color var(--transition-base);
}

.search-bar__inner:focus-within {
    border-color: var(--color-primary);
    background: white;
}

.search-bar__icon {
    color: var(--color-text-muted);
    font-size: 17px;
    flex-shrink: 0;
}

.search-bar__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text-dark);
    outline: none;
}

.search-bar__input::placeholder {
    color: var(--color-text-muted);
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section {
    padding: var(--space-xl) 0;
}

.section--no-top {
    padding-top: 0;
}

.section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    margin-bottom: var(--space-md);
}

.section__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-dark);
    letter-spacing: -0.3px;
}

.section__link {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   CAROUSEL / PROMO BANNER
   ============================================================ */
.promo-carousel {
    padding: var(--space-sm) var(--space-lg) var(--space-xl);
}

.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.carousel-inner {
    display: flex;
    width: 100%;
    transition: transform 0.45s ease;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
}

.carousel-slide {
    position: relative;
    height: 195px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-slide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(212, 115, 138, 0.45) 0%,
        rgba(244, 167, 185, 0.25) 50%,
        transparent 100%
    );
}

.carousel-slide__content {
    position: relative;
    z-index: 2;
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    color: white;
}

.carousel-slide__tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.carousel-slide__title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-xs);
}

.carousel-slide__sub {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: var(--space-md);
}

.carousel-slide__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: white;
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.carousel-slide__btn:active {
    transform: scale(0.97);
}

.carousel__indicators {
    position: absolute;
    bottom: 14px;
    right: 18px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel__dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.carousel__dot.active {
    background: white;
    width: 20px;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.products-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding: var(--space-xs) var(--space-lg) var(--space-sm);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.products-scroll::-webkit-scrollbar {
    display: none;
}

.product-card {
    min-width: 155px;
    max-width: 155px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    flex-shrink: 0;
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base);
    border: 1px solid var(--color-border);
}

.product-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-xs);
}

.product-card__img-wrap {
    position: relative;
    height: 155px;
    background: var(--color-primary-light);
    overflow: hidden;
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-badge);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

.product-card__wishlist {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 14px;
    backdrop-filter: blur(4px);
}

.product-card__wishlist.active {
    color: var(--color-badge);
}

.product-card__body {
    padding: 12px var(--space-sm) var(--space-sm);
}

.product-card__category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--color-primary-medium);
    margin-bottom: 4px;
}

.product-card__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-dark);
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__pricing {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.product-card__price-old {
    font-size: 11px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.product-card__add {
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    transition:
        background var(--transition-fast),
        transform var(--transition-fast);
}

.product-card__add:active {
    background: var(--color-primary-dark);
    transform: scale(0.92);
}

/* Product Rating */
.product-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.product-card__stars {
    color: #ffb347;
    font-size: 11px;
    letter-spacing: -1px;
}

.product-card__rating-count {
    font-size: 10px;
    color: var(--color-text-muted);
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.category-section {
    background: var(--color-bg-section);
    padding: var(--space-xl) 0;
}

.category-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding: var(--space-xs) var(--space-lg) var(--space-sm);
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    cursor: pointer;
}

.category-item__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.category-item.active .category-item__icon,
.category-item:active .category-item__icon {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-item__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-body);
    text-align: center;
    white-space: nowrap;
}

.category-item.active .category-item__label {
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* ============================================================
   FEATURED BANNER
   ============================================================ */
.featured-banner {
    margin: 0 var(--space-lg);
    border-radius: var(--radius-xl);
    background: linear-gradient(
        135deg,
        var(--color-primary-dark) 0%,
        var(--color-primary) 50%,
        var(--color-primary-light) 100%
    );
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
}

.featured-banner::before {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.featured-banner::after {
    content: "";
    position: absolute;
    bottom: -40px;
    right: 60px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.featured-banner__content {
    position: relative;
    z-index: 1;
}

.featured-banner__tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.featured-banner__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
    margin-bottom: 4px;
}

.featured-banner__sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-md);
}

.featured-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
}

.featured-banner__img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

/* ============================================================
   SOCIAL FEED / POST
   ============================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    padding: 0 var(--space-lg);
}

.post-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base);
}

.post-card:active {
    transform: scale(0.97);
}

.post-card__img-wrap {
    height: 130px;
    overflow: hidden;
    background: var(--color-primary-light);
    position: relative;
}

.post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__platform {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: var(--shadow-xs);
}

.post-card__body {
    padding: var(--space-sm);
}

.post-card__handle {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 4px;
}

.post-card__caption {
    font-size: 12px;
    color: var(--color-text-body);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.post-card__likes {
    font-size: 11px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max-width);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-nav);
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    cursor: pointer;
    padding: 4px 0;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-item__icon {
    font-size: 22px;
    color: var(--color-text-muted);
    transition:
        color var(--transition-fast),
        transform var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 30px;
}

.nav-item__label {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    letter-spacing: 0.2px;
}

/* Active State */
.nav-item.active .nav-item__icon {
    color: var(--color-primary-dark);
}

.nav-item.active .nav-item__label {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.nav-item.active .nav-item__icon::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 30px;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    z-index: -1;
    border-radius: var(--radius-full);
}

.nav-item__icon {
    position: relative;
}

.nav-item__dot {
    position: absolute;
    top: 2px;
    right: 8px;
    width: 7px;
    height: 7px;
    background: var(--color-badge);
    border-radius: var(--radius-full);
    border: 2px solid white;
}

/* ============================================================
   PAGE BOTTOM PADDING (for nav bar)
   ============================================================ */
.page-content {
    padding-bottom: calc(var(--nav-height) + 10px);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-primary {
    color: var(--color-primary-dark);
}
.text-muted {
    color: var(--color-text-muted);
}
.text-dark {
    color: var(--color-text-dark);
}
.text-sm {
    font-size: 13px;
}
.text-xs {
    font-size: 11px;
}
.fw-600 {
    font-weight: 600;
}
.fw-700 {
    font-weight: 700;
}
.mt-sm {
    margin-top: var(--space-sm);
}
.mt-md {
    margin-top: var(--space-md);
}
.mt-lg {
    margin-top: var(--space-lg);
}

/* ============================================================
   GREETING STRIP
   ============================================================ */
.greeting-strip {
    padding: var(--space-md) var(--space-lg) var(--space-xs);
    background: var(--color-white);
}

.greeting-strip__name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.greeting-strip__sub {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* ============================================================
   FLASH SALE STRIP
   ============================================================ */
.flash-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
    margin: 0 var(--space-lg) var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
}

.flash-strip__left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.flash-strip__icon {
    font-size: 20px;
}

.flash-strip__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-dark);
}

.flash-strip__sublabel {
    font-size: 11px;
    color: var(--color-text-muted);
}

.flash-strip__timer {
    display: flex;
    align-items: center;
    gap: 4px;
}

.timer-block {
    background: var(--color-primary-dark);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 7px;
    border-radius: 6px;
    min-width: 28px;
    text-align: center;
    line-height: 1.2;
}

.timer-sep {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-dark);
}

/* ============================================================
   SCROLL FADE EDGES
   ============================================================ */
.scroll-fade-wrapper {
    position: relative;
}

.scroll-fade-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--color-bg));
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   ANIMATION
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease both;
}

.delay-1 {
    animation-delay: 0.05s;
}
.delay-2 {
    animation-delay: 0.1s;
}
.delay-3 {
    animation-delay: 0.15s;
}
.delay-4 {
    animation-delay: 0.2s;
}
.delay-5 {
    animation-delay: 0.25s;
}

/* ============================================================
   RESPONSIVE — Keep Mobile Layout on Desktop
   ============================================================ */
@media (min-width: 480px) {
    .app-wrapper {
        margin-top: 0;
        border-radius: 0;
        box-shadow: 0 0 80px rgba(0, 0, 0, 0.1);
    }
}

@media (min-width: 768px) {
    body {
        background: #f5eff1;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        min-height: 100vh;
        padding: var(--space-2xl) 0;
    }

    .app-wrapper {
        border-radius: 28px;
        overflow: hidden;
        box-shadow:
            0 20px 80px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(212, 115, 138, 0.1);
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .bottom-nav {
        border-radius: 0 0 28px 28px;
    }
}
