/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --primary-color: #ff69b4;
    --secondary-color: #ff1493;
    --accent-color: #ffb6c1;
    --text-color: #333;
    --light-gray: #fff5f7;
    --border-color: #ffc0cb;
    --white: #ffffff;
    --success-color: #ff69b4;
    --shadow: 0 2px 10px rgba(255, 105, 180, 0.2);
    --shadow-hover: 0 5px 20px rgba(255, 20, 147, 0.3);
    --transition: all 0.3s ease;
    --app-width: 480px;
}

/* ============================================
   RESET ET BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #f7f2f5;
    overflow-x: hidden;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.app-shell {
    width: min(100%, var(--app-width));
    min-height: 100vh;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 0 36px rgba(89, 50, 68, 0.12);
    overflow: hidden;
}

.app-main {
    min-height: 60vh;
}

.app-view {
    display: none;
}

.app-view:not(.active-view) {
    display: none;
}

.app-view.active-view {
    display: block;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(255, 20, 147, 0.35);
    outline-offset: 3px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.offline-status {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 2800;
    width: min(calc(100% - 24px), calc(var(--app-width) - 24px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(44, 62, 80, 0.96);
    color: var(--white);
    box-shadow: 0 10px 26px rgba(44, 62, 80, 0.22);
    font-size: 12px;
    line-height: 1.35;
}

.offline-status[hidden] {
    display: none;
}

.offline-status i {
    color: #8df0bd;
    font-size: 16px;
}

body.is-server-down .offline-status {
    background: rgba(112, 78, 28, 0.96);
    box-shadow: 0 10px 26px rgba(112, 78, 28, 0.22);
}

body.is-server-down .offline-status i {
    color: #ffd68a;
}

body.is-offline .whatsapp-action,
body.is-offline .contact-action.primary,
body.is-offline #checkoutBtn {
    filter: saturate(0.55);
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--app-width);
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    min-height: 44px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn-primary {
    background: var(--white);
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 20, 147, 0.4);
}

.btn-block {
    width: 100%;
    display: block;
}

.badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* ============================================
   HEADER
   ============================================ */
.top-banner {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.9) 0%, rgba(255, 182, 193, 0.85) 100%);
    color: var(--white);
    text-align: center;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 2200;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    max-width: var(--app-width);
    margin: 0 auto;
}

.menu-toggle {
    font-size: 24px;
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    position: relative;
    font-size: 20px;
    color: var(--primary-color);
    transition: var(--transition);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--secondary-color);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    z-index: 2500;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.08) 0%, transparent 100%);
}

.mobile-menu-header h3 {
    font-size: 20px;
    color: var(--primary-color);
}

.close-menu {
    font-size: 24px;
    color: var(--primary-color);
    transition: var(--transition);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

.menu-list {
    padding: 20px;
}

.menu-list li {
    margin-bottom: 20px;
}

.menu-list a,
.menu-list button {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: var(--text-color);
    transition: var(--transition);
    text-align: left;
}

.menu-list a:hover,
.menu-list button:hover {
    color: var(--secondary-color);
    padding-left: 10px;
    background: linear-gradient(90deg, rgba(255, 105, 180, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--secondary-color);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, rgba(33, 22, 28, 0.25) 0%, rgba(255, 105, 180, 0.68) 100%),
                url('https://images.unsplash.com/photo-1556228720-195a672e8a03?auto=format&fit=crop&w=1000&q=80') center/cover;
    padding: 34px 15px;
    text-align: center;
    color: #fff;
    min-height: 238px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero.app-view.active-view {
    display: flex;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 23px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    text-shadow: 2px 2px 8px rgba(255, 20, 147, 0.3);
    letter-spacing: 0;
}

.hero-subtitle {
    font-size: 14px;
    margin-bottom: 18px;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
    font-weight: 400;
}

/* ============================================
   CATEGORIES QUICK ACCESS
   ============================================ */
.categories-quick {
    padding: 40px 15px;
    background: var(--light-gray);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.category-card {
    background: var(--white);
    padding: 0 0 18px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    color: inherit;
}

.category-image {
    width: 100%;
    height: 118px;
    object-fit: cover;
    margin-bottom: 14px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-card i {
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.featured-products,
.new-products,
.shop-products,
.favorites-section,
.about-section,
.contact-section {
    padding: 34px 15px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.page-hero-card,
.story-panel {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 20px;
    height: 154px;
    min-height: 154px;
    box-shadow: var(--shadow);
    background: #222;
}

.page-hero-card img,
.story-panel > img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    filter: saturate(1.05);
}

.page-hero-card::after,
.story-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.52));
}

.page-hero-card > div,
.story-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
    color: var(--white);
}

.page-hero-card p,
.eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.page-hero-card h2,
.story-content h2 {
    font-size: 21px;
    line-height: 1.2;
}

.story-panel {
    height: 340px;
    min-height: 340px;
}

.story-panel > img {
    min-height: 0;
}

.contact-panel {
    height: 300px;
    min-height: 300px;
    margin-bottom: 0;
}

.contact-panel > img {
    min-height: 0;
}

.story-content p:not(.eyebrow) {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.65;
}

.whatsapp-action {
    margin-top: 18px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--secondary-color);
}

.contact-grid {
    display: grid;
    gap: 12px;
}

.contact-actions {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.contact-action {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 14px;
    border-radius: 16px;
    background: var(--white);
    border: 1px solid rgba(255, 192, 203, 0.7);
    box-shadow: var(--shadow);
    color: var(--text-color);
}

.contact-action.primary {
    background: linear-gradient(135deg, #1fbf75, #129455);
    border-color: rgba(31, 191, 117, 0.45);
    color: var(--white);
}

.contact-action i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--secondary-color);
    font-size: 20px;
}

.contact-action.primary i {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
}

.contact-action strong,
.contact-action small {
    display: block;
}

.contact-action strong {
    font-size: 14px;
    line-height: 1.25;
}

.contact-action small {
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.82;
}

.contact-card {
    background: var(--white);
    border: 1px solid rgba(255, 192, 203, 0.7);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.contact-card i {
    color: var(--secondary-color);
    font-size: 18px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--light-gray);
    margin-bottom: 10px;
}

.contact-card h3 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 5px;
}

.contact-card p {
    font-size: 13px;
    line-height: 1.55;
}

.contact-card-wide {
    background: linear-gradient(135deg, rgba(255, 245, 247, 0.95), rgba(255, 255, 255, 0.95));
}

.empty-state {
    grid-column: 1 / -1;
    padding: 34px 20px;
    border-radius: 18px;
    background: var(--light-gray);
    text-align: center;
    color: #666;
}

.empty-state i {
    color: var(--secondary-color);
    font-size: 28px;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: var(--primary-color);
    margin-bottom: 6px;
}

.shop-directory {
    display: grid;
    gap: 13px;
}

.shop-directory[hidden] {
    display: none;
}

.shop-card {
    position: relative;
    min-height: 174px;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #222;
    box-shadow: var(--shadow);
    color: var(--white);
    text-align: left;
    transition: var(--transition);
}

.shop-card:hover,
.shop-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.shop-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.68));
}

.shop-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 800;
}

.shop-card-info {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 15px;
    z-index: 1;
}

.shop-card-info p {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 6px;
    opacity: 0.95;
}

.shop-card-info h3 {
    font-size: 21px;
    line-height: 1.15;
    margin-bottom: 10px;
}

.shop-card-info span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--white);
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 800;
}

.shop-detail-view[hidden] {
    display: none;
}

.back-to-shops {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-bottom: 16px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--light-gray);
    color: var(--primary-color);
    font-weight: 700;
}

.selected-shop-hero {
    position: relative;
    height: 170px;
    min-height: 170px;
    margin-bottom: 18px;
    border-radius: 16px;
    overflow: hidden;
    background: #222;
    box-shadow: var(--shadow);
}

.selected-shop-hero img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.selected-shop-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.68));
}

.selected-shop-info {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 15px;
    z-index: 1;
    color: var(--white);
}

.selected-shop-info p {
    font-size: 12px;
    line-height: 1.45;
}

.selected-shop-info .eyebrow {
    margin-bottom: 6px;
}

.selected-shop-info h2 {
    font-size: 22px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.product-image {
    position: relative;
    height: 200px;
    background: var(--light-gray);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.product-info {
    padding: 15px;
}

.product-category {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
}

.price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    min-height: 44px;
    padding: 10px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: var(--secondary-color);
}

/* ============================================
   WHY CHOOSE US
   ============================================ */
.why-choose-us {
    padding: 50px 15px;
    background: var(--light-gray);
}

.features-grid {
    display: grid;
    gap: 20px;
}

.feature-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 28px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   BRANDS SECTION
   ============================================ */
.brands-section {
    padding: 50px 15px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.brand-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.brand-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: var(--secondary-color);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 24px 15px 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.footer-col {
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-col:nth-child(3) {
    grid-column: 1 / -1;
}

.footer-col h3 {
    font-size: 12px;
    line-height: 1.25;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
    font-weight: 600;
}

.footer-col ul li {
    margin-bottom: 7px;
}

.footer-col a {
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.8;
    transition: var(--transition);
    word-break: break-word;
}

.footer-col a:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-col p {
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 7px;
    opacity: 0.9;
}

.footer-col i {
    width: 18px;
    margin-right: 6px;
    color: var(--white);
    opacity: 0.9;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom p {
    font-size: 12px;
    opacity: 0.7;
}

/* ============================================
   CART PAGE
   ============================================ */
.cart-page {
    padding: 34px 15px;
    background: linear-gradient(180deg, var(--white), var(--light-gray));
}

.cart-page-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid rgba(255, 192, 203, 0.7);
    box-shadow: var(--shadow);
}

.cart-page-header p {
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cart-page-header h2 {
    color: var(--primary-color);
    font-size: 24px;
    line-height: 1.15;
}

.cart-page-header span {
    grid-row: 1 / span 2;
    grid-column: 2;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    color: var(--white);
    font-weight: 800;
}

.cart-page-layout {
    display: grid;
    gap: 16px;
}

.cart-page-list,
.cart-summary-panel {
    background: var(--white);
    border: 1px solid rgba(255, 192, 203, 0.68);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-page .cart-items {
    max-height: none;
    overflow: visible;
    padding: 0;
}

.cart-page .cart-item {
    align-items: flex-start;
    padding: 14px;
    gap: 12px;
}

.cart-page .cart-item:last-child {
    border-bottom: 0;
}

.cart-page .cart-item-image {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    border-radius: 14px;
}

.cart-page .cart-item-title {
    font-size: 14px;
    line-height: 1.3;
}

.cart-item-line-total {
    margin-top: 2px;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 14px;
}

.cart-page .cart-item-quantity {
    flex-wrap: wrap;
    gap: 8px;
}

.cart-page .quantity-btn {
    width: 38px;
    height: 38px;
}

.cart-summary-panel {
    padding: 16px;
}

.cart-summary-panel h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 12px;
}

.cart-summary-row,
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 192, 203, 0.5);
    font-size: 14px;
}

.cart-summary-total {
    border-bottom: 0;
    padding: 14px 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 800;
}

.cart-summary-panel .btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.cart-summary-panel .btn-primary:disabled {
    background: #d9a6ba;
    color: var(--white);
}

.continue-shopping {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    border-radius: 999px;
    background: var(--light-gray);
    color: var(--primary-color);
    font-weight: 700;
}

.continue-shopping i {
    margin-right: 8px;
}

.cart-help-card,
.cart-empty-state {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: var(--light-gray);
    color: #666;
    font-size: 13px;
    line-height: 1.55;
}

.cart-help-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cart-help-card i,
.cart-empty-state i {
    color: var(--secondary-color);
    font-size: 20px;
}

.cart-empty-state {
    margin: 0;
    padding: 34px 18px;
    text-align: center;
}

.cart-empty-state i {
    font-size: 30px;
    margin-bottom: 10px;
}

.cart-empty-state h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 6px;
}

/* ============================================
   CART SIDEBAR
   ============================================ */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 90%;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    z-index: 2500;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.05) 0%, transparent 100%);
}

.cart-header h3 {
    font-size: 20px;
    color: var(--primary-color);
}

.close-cart {
    font-size: 24px;
    color: var(--primary-color);
    transition: var(--transition);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cart:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: calc(100vh - 200px);
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: var(--light-gray);
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.quantity-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.quantity-btn.remove-item {
    margin-left: auto;
    background: #e74c3c;
    color: var(--white);
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid var(--accent-color);
    background: linear-gradient(180deg, transparent 0%, rgba(255, 182, 193, 0.1) 100%);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ============================================
   SEARCH MODAL
   ============================================ */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 3000;
    padding-top: 60px;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close-search {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 32px;
    color: var(--white);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box {
    display: flex;
    background: var(--white);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-submit {
    padding: 15px 25px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 18px;
    min-width: 56px;
}

.search-results {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.search-empty {
    text-align: center;
    color: #777;
    padding: 20px;
}

.search-result-item {
    display: flex;
    gap: 15px;
    width: 100%;
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    border-radius: 12px;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--light-gray);
}

.search-result-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 60px;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.search-result-category {
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

.search-result-price {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
}

/* ============================================
   PRODUCT DETAIL SHEET
   ============================================ */
.product-detail-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2600;
    max-height: min(88vh, 760px);
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
    background: var(--white);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -14px 34px rgba(255, 105, 180, 0.22);
    overflow-y: auto;
    transform: translateY(110%);
    transition: transform 0.28s ease;
}

.product-detail-sheet.active {
    transform: translateY(0);
}

.sheet-handle {
    width: 46px;
    height: 5px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #f0b6ca;
}

.close-product-detail {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.product-detail-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 340px;
    border-radius: 18px;
    background: var(--light-gray);
    overflow: hidden;
}

.product-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-meta {
    padding: 18px 2px 0;
}

.product-detail-category {
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-detail-title {
    padding-right: 48px;
    color: var(--primary-color);
    font-size: 22px;
    line-height: 1.25;
    margin-bottom: 10px;
}

.product-detail-description {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.product-detail-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.product-detail-current-price {
    color: var(--secondary-color);
    font-size: 22px;
    font-weight: 800;
}

.product-detail-old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 15px;
}

.product-detail-actions {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    position: sticky;
    bottom: 0;
    padding-top: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0), var(--white) 26%);
}

.product-detail-wishlist {
    min-height: 52px;
    border-radius: 16px;
    background: var(--light-gray);
    color: var(--secondary-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-add {
    min-height: 52px;
    border-radius: 16px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    font-size: 15px;
}

.product-detail-add:hover,
.product-detail-wishlist:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* ============================================
   OVERLAY
   ============================================ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
    display: none;
    z-index: 2000;
}

.overlay.active {
    display: block;
}

/* ============================================
   BOTTOM APP NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    width: min(100%, var(--app-width));
    margin: 0 auto;
    bottom: 0;
    z-index: 1800;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(255, 192, 203, 0.75);
    box-shadow: 0 -8px 24px rgba(255, 105, 180, 0.14);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.bottom-nav-item {
    position: relative;
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 14px;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 18px;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus-visible,
.bottom-nav-item.active {
    background: var(--light-gray);
    color: var(--secondary-color);
}

.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 18%;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE DESIGN - TABLETS
   ============================================ */
@media (min-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - DESKTOP
   ============================================ */
@media (min-width: 1024px) {
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .bottom-nav {
        display: grid;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero {
        min-height: 260px;
    }
    
    .hero-title {
        font-size: 30px;
    }
    
    .product-image {
        height: 220px;
    }

    .product-detail-sheet {
        left: 50%;
        right: auto;
        width: min(100%, var(--app-width));
        border-radius: 22px 22px 0 0;
        transform: translate(-50%, 110%);
        padding-top: 22px;
    }

    .product-detail-sheet.active {
        transform: translate(-50%, 0);
    }
}

@media (max-width: 520px) {
    body {
        background: var(--white);
    }

    .app-shell {
        box-shadow: none;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
