:root {
    --primary: #ff4757;
    --primary-light: #ff6b81;
    --secondary: #2ed573;
    --bg-color: #f7f8fa;
    --text-main: #2f3542;
    --text-muted: #747d8c;
    --white: #ffffff;
    --border: #f1f2f6;
    --shadow: 0 4px 15px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent; }

body { background: #e0e0e0; display: flex; justify-content: center; color: var(--text-main); overflow: hidden; }

/* App Container (Responsive up to 1600px PC) */
.app-container { width: 100%; margin: 0 auto; height: 100vh; height: 100dvh; background: var(--bg-color); position: relative; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 20px rgba(0,0,0,0.1); }

/* Header */
.app-header { background: var(--white); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.location-selector { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.location-icon { width: 35px; height: 35px; background: rgba(255, 71, 87, 0.1); color: var(--primary); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 16px; }
.location-info .label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.location-info h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.location-info h3 i { font-size: 12px; color: var(--primary); }
.icon-btn { background: transparent; border: none; font-size: 20px; color: var(--text-main); position: relative; cursor: pointer; }
.cart-badge { position: absolute; top: -5px; right: -8px; background: var(--primary); color: var(--white); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 2px solid var(--white); }

/* Main Content */
.app-main { flex: 1; overflow-y: auto; padding-bottom: calc(58px + env(safe-area-inset-bottom)); width: 100%; }

/* Search */
.search-container { padding: 15px 20px; }
.search-box { background: var(--white); border-radius: 12px; display: flex; align-items: center; padding: 12px 15px; box-shadow: var(--shadow); }
.search-box i { color: var(--text-muted); margin-right: 10px; }
.search-box input { border: none; outline: none; width: 100%; font-size: 14px; font-weight: 500; }

/* Promo Banner */
.promo-banner { margin: 0 20px 20px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 16px; padding: 20px; color: var(--white); display: flex; justify-content: space-between; align-items: center; position: relative; overflow: hidden; box-shadow: 0 10px 20px rgba(255, 71, 87, 0.3); }
.promo-content h2 { font-size: 18px; font-weight: 800; margin-bottom: 5px; }
.promo-content p { font-size: 13px; font-weight: 500; opacity: 0.9; }
.promo-img { width: 80px; height: 80px; object-fit: contain; border-radius: 10px; }

/* Categories */
.categories-section { padding: 0 0 20px 20px; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 15px; padding-right: 20px; }
.categories-slider { display: flex; gap: 15px; overflow-x: auto; padding-right: 20px; scrollbar-width: none; padding-bottom: 10px; }
.categories-slider::-webkit-scrollbar { display: none; }
.category-card { min-width: 85px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.category-img { width: 65px; height: 65px; background: var(--white); border-radius: 20px; padding: 10px; box-shadow: var(--shadow); display: flex; justify-content: center; align-items: center; transition: transform 0.2s; }
.category-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.category-card:active .category-img { transform: scale(0.95); }
.category-card span { font-size: 12px; font-weight: 600; text-align: center; }

/* Products Grid */
.products-section { padding: 0 20px 20px; }
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.product-card { background: var(--white); border-radius: 16px; padding: 15px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.product-img { width: 100%; height: 120px; object-fit: contain; margin-bottom: 15px; border-radius: 10px; }
.product-price { font-size: 16px; font-weight: 800; color: var(--primary); margin-bottom: 5px; }
.product-title { font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-stock { font-size: 11px; color: var(--text-muted); margin-bottom: 15px; }
.btn-add { background: var(--bg-color); color: var(--primary); border: none; padding: 8px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: all 0.2s; display: flex; justify-content: center; align-items: center; font-size: 14px; }
.btn-add:active { background: var(--primary); color: var(--white); }

/* Responsive adjustments for PC/Tablet to look professional */
@media (min-width: 768px) {
    .search-container { max-width: 700px; margin: 15px auto; padding: 0; }
    .promo-banner { max-width: 1200px; margin: 0 auto 20px; }
    .categories-section { padding: 20px 0; max-width: 1200px; margin: 0 auto; }
    .categories-slider { flex-wrap: wrap; overflow-x: visible; padding-right: 0; gap: 25px; }
    .category-card { min-width: 100px; }
    .category-img { width: 80px; height: 80px; }
    .section-title { font-size: 22px; margin-bottom: 25px; }
    
    /* Align frontend builder blocks exactly like product grid */
    .pb-section > div { max-width: 1200px; margin: 0 auto; }
    .pb-section .section-title { max-width: 1200px; margin: 0 auto 25px; }
}

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 10px 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1000; }
.product-gallery img { pointer-events: none; -webkit-touch-callout: none; user-select: none; -webkit-user-drag: none; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--text-muted); text-decoration: none; font-size: 10px; font-weight: 600; }
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--primary); }
.nav-icon-wrapper { position: relative; }

/* Bottom Sheet Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 100000; display: flex; flex-direction: column; justify-content: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.bottom-sheet { background: var(--white); width: 100%; border-radius: 24px 24px 0 0; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; flex-direction: column; max-height: 85vh; }
.modal-overlay.active .bottom-sheet { transform: translateY(0); }
.bottom-sheet.full-height { height: 85vh; }
.sheet-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.sheet-header h3 { font-size: 18px; font-weight: 700; }
.close-sheet { background: rgba(0,0,0,0.05); border: none; width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 14px; cursor: pointer; }
.sheet-body { padding: 20px; overflow-y: auto; }

/* Store List */
.store-list { list-style: none; }
.store-list li { padding: 15px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.2s; }
.store-list li.active { border-color: var(--primary); background: rgba(255, 71, 87, 0.05); }
.store-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.store-info p { font-size: 12px; color: var(--text-muted); }

/* Cart */
.cart-body { display: flex; flex-direction: column; height: 100%; padding: 0; }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; gap: 15px; margin-bottom: 20px; }
.cart-item-img { width: 60px; height: 60px; border-radius: 10px; object-fit: contain; background: var(--bg-color); padding: 5px; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.cart-item-info .price { font-size: 14px; font-weight: 700; color: var(--primary); }
.qty-controls { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.qty-btn { width: 25px; height: 25px; border-radius: 50%; border: none; background: var(--bg-color); font-weight: 700; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.cart-summary { padding: 20px; border-top: 1px solid var(--border); background: var(--white); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; color: var(--text-muted); font-weight: 500; }
.summary-row.total { font-size: 18px; color: var(--text-main); font-weight: 800; margin-bottom: 20px; }
.btn-checkout { width: 100%; padding: 16px; background: var(--primary); color: var(--white); border: none; border-radius: 16px; font-size: 16px; font-weight: 700; cursor: pointer; }

/* Product Widget Improvements */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.pb-product-card img:not(.hover-img) {
    background-color: #f5f5f5;
}

.pb-product-card img {
    transition: opacity 0.3s ease;
}

.pb-product-card:hover .hover-img {
    opacity: 1 !important;
}

/* Category Widget Improvements */
.cat-card-stagger {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.cat-card-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

.cat-skeleton-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.cat-skeleton-img.loaded {
    animation: none;
    background: transparent;
}

/* =========================================
   APP WIDGETS (Stories & Flash Sale)
========================================= */

/* --- Stories Bubbles --- */
.story-scroller {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 0 20px 15px;
    scrollbar-width: none;
}
.story-scroller::-webkit-scrollbar { display: none; }

.story-bubble-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-width: 72px;
    transition: transform 0.2s;
}
.story-bubble-wrap:active { transform: scale(0.95); }

.story-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    position: relative;
    box-sizing: border-box;
}
.story-ring.viewed { background: #e0e0e0; }

.story-ring img, .story-ring video {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid #fff;
    box-sizing: border-box;
}

.story-title {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-align: center;
    max-width: 72px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Story Fullscreen Viewer --- */
.story-viewer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #111;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s;
}
.story-viewer-overlay.active { opacity: 1; }

.story-progress-container {
    position: absolute;
    top: 15px; left: 10px; right: 10px;
    display: flex;
    gap: 4px;
    z-index: 10;
}
.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}
.story-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

.story-header {
    position: absolute;
    top: 30px; left: 15px; right: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    color: #fff;
}
.story-header-info { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.story-header-info img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); }
.story-close-btn { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

.story-media-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.story-media-container img, .story-media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-touch-zones {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 80px;
    display: flex;
    z-index: 5;
}
.story-zone-prev { flex: 0.3; }
.story-zone-next { flex: 0.7; }

/* Action Button at bottom */
.story-action-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    color: #000;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
    animation: bounceBtn 2s infinite;
}
.story-action-btn:active { transform: translateX(-50%) scale(0.95); }
@keyframes bounceBtn { 0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);} 40% {transform: translateX(-50%) translateY(-10px);} 60% {transform: translateX(-50%) translateY(-5px);} }

/* --- Flash Sale --- */
.flash-sale-wrap {
    margin: 0 20px 20px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    position: relative;
}
.flash-sale-img {
    width: 40%;
    position: relative;
}
.flash-sale-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.flash-sale-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.flash-sale-content {
    width: 60%;
    padding: 15px;
    display: flex;
    flex-direction: column;
}
.flash-sale-title { font-size: 14px; font-weight: 700; color: #333; margin-bottom: 5px; line-height: 1.2; }
.flash-sale-prices { margin-bottom: 10px; }
.flash-sale-price-old { font-size: 12px; color: #999; text-decoration: line-through; margin-right: 5px; }
.flash-sale-price-new { font-size: 18px; font-weight: 800; color: #e74c3c; }

.flash-timer-box {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}
.flash-timer-item {
    background: #f5f6fa;
    color: #2f3640;
    border-radius: 6px;
    padding: 5px 8px;
    font-weight: 800;
    font-size: 14px;
    min-width: 25px;
    text-align: center;
}
.flash-timer-colon { font-weight: 800; color: #2f3640; align-self: center; }

.flash-stock-wrap { margin-top: auto; }
.flash-stock-text { font-size: 11px; color: #555; font-weight: 600; margin-bottom: 5px; display: flex; justify-content: space-between; }
.flash-stock-bar-bg { width: 100%; height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.flash-stock-bar-fill { height: 100%; background: #e74c3c; border-radius: 3px; }

/* --- RESPONSIVE LAYOUT (PC & TABLET) --- */
.top-header { display: none; }

.ajax-search-results { 
    display: none; 
    position: absolute; 
    top: calc(100% + 5px); 
    left: 0; right: 0; 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    z-index: 1000; 
    max-height: 400px; 
    overflow-y: auto; 
    border: 1px solid #f1f5f9;
}
.search-container { position: relative; }
.th-search { position: relative; }

.ajax-item { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 12px 15px; 
    border-bottom: 1px solid #f1f5f9; 
    cursor: pointer; 
    text-decoration: none; 
    color: #333; 
    transition: background 0.2s;
}
.ajax-item:last-child { border-bottom: none; }
.ajax-item:hover { background: #f8fafc; }
.ajax-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.ajax-item-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ajax-item-info h4 { margin: 0; font-size: 14px; font-weight: 600; color: #1e293b; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ajax-item-info p { margin: 0; font-size: 13px; color: #e74c3c; font-weight: 800; }

.login-modal-box { 
    background: #fff; 
    width: 90%; 
    max-width: 420px; 
    margin: auto; 
    border-radius: 24px; 
    position: relative; 
    padding: 30px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); 
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.close-login { 
    position: absolute; top: 20px; right: 20px; 
    background: #f1f5f9; border: none; width: 36px; height: 36px; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; color: #64748b; transition: all 0.2s; 
}
.close-login:hover { background: #e2e8f0; color: #0f172a; }

.login-header h3 { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: #0f172a; }
.login-header p { margin: 0 0 25px; font-size: 14px; color: #64748b; line-height: 1.5; }

.product-modal-box {
    background: #fff;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    max-height: 800px;
    margin: auto;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.close-product {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0f172a;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.close-product:hover {
    background: #fff;
    transform: scale(1.1);
}

@media (min-width: 768px) {
  .bottom-nav { display: none !important; }
  .app-main .search-container { display: none !important; }
  
  .app-main { padding-top: 20px; padding-bottom: 40px; max-width: 1200px; width: 100% !important; margin: 0 auto; }
  #productSpaView { width: 100% !important; min-width: 100% !important; }
  #productIframe { width: 100% !important; min-width: 100% !important; }
  
  .top-header { 
      display: block; 
      position: sticky; 
      top: 0; 
      z-index: 900; 
      background: rgba(255, 255, 255, 0.95); 
      backdrop-filter: blur(10px);
      border-bottom: 1px solid #f1f5f9; 
      padding: 12px 20px; 
      box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  }
  
  .th-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
  
  .th-logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
  .th-logo img { height: 50px; border-radius: 8px; object-fit: contain; }
  
  .th-search { flex: 1; max-width: 600px; position: relative; }
  .th-search .search-box { 
      background: #f8fafc; 
      border: 2px solid #f1f5f9;
      border-radius: 12px; 
      padding: 12px 20px; 
      display: flex; align-items: center; gap: 12px; 
      transition: all 0.2s;
  }
  .th-search .search-box:focus-within { background: #fff; border-color: #ff4757; box-shadow: 0 0 0 4px rgba(255,71,87,0.1); }
  .th-search i { color: #94a3b8; font-size: 18px; }
  .th-search input { border: none; background: transparent; width: 100%; outline: none; font-family: 'Outfit', sans-serif; font-size: 15px; color: #334155; }
  .th-search input::placeholder { color: #94a3b8; }
  
  .th-actions { display: flex; align-items: center; gap: 15px; }
  
  .th-btn { 
      background: #f8fafc; border: 1px solid #f1f5f9; 
      cursor: pointer; font-family: 'Outfit', sans-serif; 
      font-size: 14px; font-weight: 700; color: #334155; 
      display: flex; align-items: center; gap: 8px; 
      padding: 10px 16px; border-radius: 12px; 
      transition: all 0.2s; 
  }
  .th-btn:hover { background: #f1f5f9; color: #0f172a; transform: translateY(-2px); }
  .th-btn i { font-size: 18px; color: #ff4757; }
  
  /* OVERRIDE CART TO SIDEBAR */
  #cartModal.modal-overlay { flex-direction: row; justify-content: flex-end; align-items: stretch; }
  #cartModal .bottom-sheet { 
      position: relative; top: auto; bottom: auto; right: auto; left: auto; 
      width: 450px; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100dvh !important; border-radius: 0; 
      transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); 
      margin-left: auto;
  }
  #cartModal.active .bottom-sheet { transform: translateX(0); }
}

/* =========================================
   PROFILE SPA STYLES
   ========================================= */
.profile-container { display: flex; flex-direction: column; gap: 20px; max-width: 1200px; margin: 0 auto; width: 100%; }
@media(min-width: 768px) { .profile-container { flex-direction: row; align-items: flex-start; } }
.profile-sidebar { background: #fff; border-radius: 12px; padding: 20px; flex: 1; max-width: 100%; width: 100%; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
@media(min-width: 768px) { .profile-sidebar { max-width: 300px; } }
.profile-avatar-sec { text-align: center; margin-bottom: 20px; }
.profile-avatar-sec img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid #e2e8f0; margin-bottom: 10px; }
.profile-nav { list-style: none; padding: 0; margin: 0; }
.profile-nav li { padding: 12px 15px; margin-bottom: 5px; border-radius: 8px; cursor: pointer; color: #64748b; font-weight: 500; transition: all 0.2s; display: flex; align-items: center; gap: 10px; }
.profile-nav li:hover { background: #f1f5f9; color: #0f172a; }
.profile-nav li.active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.profile-content { background: #fff; border-radius: 12px; padding: 15px; flex: 3; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
@media(min-width: 768px) { .profile-content { padding: 30px; } }
.profile-tab h2 { margin-top: 0; color: #0f172a; font-size: 20px; margin-bottom: 20px; }
.address-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; margin-bottom: 10px; position: relative; }
.address-card h4 { margin: 0 0 5px 0; color: #0f172a; display: flex; justify-content: space-between; }
.address-card p { margin: 0; color: #64748b; font-size: 14px; }
.badge-default { background: #10b981; color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 12px; margin-left: 10px; }
.btn-small { background: #e2e8f0; color: #475569; border: none; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; }

/* =========================================
   CHECKOUT SPA STYLES
   ========================================= */
.checkout-container { display: flex; flex-direction: column; gap: 30px; max-width: 1200px; margin: 0 auto; width: 100%; }
@media(min-width: 900px) { .checkout-container { flex-direction: row; align-items: flex-start; } }
.checkout-left { flex: 2; display: flex; flex-direction: column; gap: 20px; }
.checkout-right { flex: 1; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.checkout-card { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border: 1px solid #f1f5f9; }
.checkout-card h2 { margin-top: 0; color: #0f172a; font-size: 18px; margin-bottom: 20px; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.payment-method-label { cursor: pointer; }
.payment-method-label input { display: none; }
.pm-box { border: 2px solid #e2e8f0; border-radius: 8px; padding: 15px; display: flex; align-items: center; gap: 10px; color: #64748b; font-weight: 500; transition: all 0.2s; }
.payment-method-label input:checked + .pm-box { border-color: #2563eb; background: #eff6ff; color: #2563eb; }
.checkout-order-items { display: flex; flex-direction: column; gap: 15px; }
.chk-item { display: flex; gap: 15px; align-items: center; }
.chk-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; background: #f8fafc; }
.chk-item-info { flex: 1; }
.chk-item-info h4 { margin: 0; color: #0f172a; font-size: 14px; }
.chk-item-price { font-weight: 700; color: #0f172a; }
.checkout-summary-row { display: flex; justify-content: space-between; color: #64748b; margin-bottom: 10px; font-size: 14px; }
.checkout-summary-row.total { color: #0f172a; font-size: 18px; font-weight: 800; margin-top: 10px; }

/* =========================================
   CART ANIMATION
   ========================================= */
@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #10b981; }
    100% { transform: scale(1); }
}
.cart-animated { animation: cartBounce 0.4s ease; }

.responsive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}
@media(min-width: 768px) {
    .responsive-grid {
        grid-template-columns: 1fr 1fr;
    }
}
