/* ============================================
   513 STORE - Nike App Pixel-Perfect UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #ffffff;
    --card: #f3f3f3;
    --dark: #1a1a1a;
    --grey: #8e8e93;
    --light-grey: #c7c7cc;
    --accent: #5a9e9f;
    --radius: 20px;
    --radius-sm: 14px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { background: var(--bg); }

.store-app {
    font-family: var(--font);
    background: var(--bg);
    min-height: 100vh;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* ==========================================
   HEADER
   ========================================== */
.store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.store-header-left { display: flex; align-items: center; gap: 15px; }

.store-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1.5px solid #e8e8e8;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
    position: relative;
    transition: border-color 0.2s;
    font-size: 18px;
}

.store-icon-btn:hover {
    border-color: #ccc;
    text-decoration: none;
    color: var(--dark);
}

.store-header-logo img { height: 30px; width: auto; }

.store-header-right { display: flex; align-items: center; gap: 10px; }

.store-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--dark);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ==========================================
   PAGE CONTAINER
   ========================================== */
.store-container { padding: 0 24px 110px; }

/* ==========================================
   HERO / BANNER
   ========================================== */
.store-hero { margin: 8px 0 0; }

.store-hero-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 4px;
}

.store-hero-label {
    font-size: 13px;
    font-weight: 600;
    color: #55999a;
    margin-bottom: 12px;
}

/* Full-width Slideshow */
.store-slideshow {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #3d8b8c 0%, #5a9e9f 40%, #7abcbd 100%);
    margin-bottom: 24px;
}

.store-slides {
    position: relative;
    width: 100%;
    height: 280px;
}

.store-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    color: #fff;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.store-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.store-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 60%, transparent 100%);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    width: 100%;
}

.slide-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}

.slide-cat {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
}

.slide-btn {
    display: inline-block;
    padding: 9px 22px;
    background: #fff;
    color: #1a1a1a;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
}

.store-slide-dots {
    position: absolute;
    bottom: 14px;
    right: 24px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.store-slide-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.store-slide-dots span.active {
    background: #fff;
}

.store-hero-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--dark);
    color: #fff;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-family: var(--font);
    border: none;
    cursor: pointer;
}

.store-hero-btn:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

/* ==========================================
   CATEGORY TABS
   ========================================== */
.store-categories {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 0 0 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.store-categories::-webkit-scrollbar { display: none; }

.store-cat-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    white-space: nowrap;
    text-decoration: none;
    margin-right: 24px;
    transition: all 0.2s;
}

.store-cat-tab:hover { text-decoration: none; }

.store-cat-tab .cat-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--light-grey);
    transition: color 0.2s;
    line-height: 1.2;
}

.store-cat-tab .cat-count {
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
    margin-top: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.store-cat-tab.active .cat-name { color: var(--dark); }
.store-cat-tab.active .cat-count { opacity: 1; }

/* ==========================================
   PRODUCT GRID
   ========================================== */
.store-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

/* ==========================================
   PRODUCT CARD  (full image background)
   ========================================== */
.store-product-card {
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #f3f4f6;
}

.store-product-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.store-product-card .p-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-product-card .p-top {
    position: relative;
    z-index: 1;
    padding: 10px 10px 0;
}

.store-product-card .p-badge {
    display: inline-block;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 6px 10px;
}

.store-product-card .p-name {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1px;
    color: #1a1a1a;
}

.store-product-card .p-cat {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
}

.store-product-card .p-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-top: auto;
    padding: 0 10px 10px;
}

.store-product-card .p-price-badge {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    padding: 0;
}

.store-product-card .p-price {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #1a1a1a;
}

.store-product-card .p-price-label {
    font-size: 9px;
    color: #9ca3af;
    font-weight: 400;
    margin-top: 1px;
}

.store-product-card .p-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.93);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    color: #1a1a1a;
}

.store-product-card:hover .p-arrow {
    background: var(--dark);
    color: #fff;
}

.store-product-card .p-arrow i { font-size: 14px; }

/* ==========================================
   PRODUCT DETAIL PAGE
   ========================================== */
.store-detail { padding-bottom: 110px; background: var(--bg); }

.store-detail-top {
    padding: 0 24px;
}

.store-detail-name {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    margin: 10px 0 4px;
}

.store-detail-sub {
    font-size: 14px;
    color: var(--grey);
    margin-bottom: 16px;
}

.store-detail-mid {
    display: flex;
    gap: 0;
    padding: 0;
    position: relative;
}

.store-detail-sizes {
    width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0 12px 24px;
    gap: 6px;
    flex-shrink: 0;
}

.store-detail-sizes .size-label {
    font-size: 11px;
    color: var(--grey);
    font-weight: 600;
    margin-bottom: 4px;
}

.store-detail-sizes .size-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid #e5e5e5;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
}

.store-detail-sizes .size-btn.active {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}

.store-detail-sizes .size-btn.disabled,
.store-detail-sizes .size-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: #e5e5e5;
    background: #f5f5f5;
    color: #bbb;
}

.store-detail-image-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 260px;
}

.store-detail-image-area img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
}

.store-detail-fav {
    position: absolute;
    top: 12px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.store-detail-fav .fav-label {
    font-size: 11px;
    color: var(--grey);
    font-weight: 600;
}

.store-detail-fav .fav-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid #e5e5e5;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--dark);
    cursor: pointer;
}

.store-detail-bottom {
    padding: 20px 24px 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.store-detail-price {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.store-detail-price-label {
    font-size: 12px;
    color: var(--grey);
    font-weight: 500;
    margin-top: 4px;
}

.store-detail-description {
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--grey);
}

.store-detail-actions {
    padding: 0 24px;
}

.store-qty-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e5e5;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 16px;
    width: fit-content;
}

.store-qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-family: var(--font);
}

.store-qty-btn:hover { background: #f5f5f5; }

.store-qty-value {
    width: 44px;
    height: 44px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    background: none;
}

.store-add-cart-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 30px;
    background: var(--dark);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.store-add-cart-btn:hover { background: #333; }
.store-add-cart-btn i { margin-right: 8px; }

/* ==========================================
   RELATED PRODUCTS
   ========================================== */
.store-related { margin-top: 30px; }

.store-related h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 14px;
    padding: 0 24px;
}

.store-related-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 24px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.store-related-scroll::-webkit-scrollbar { display: none; }

.store-related-card {
    min-width: 155px;
    max-width: 155px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.store-related-card:hover { text-decoration: none; color: inherit; }

.store-related-card .rel-img {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 10px;
}

.store-related-card .rel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.store-related-card .rel-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-related-card .rel-price {
    font-size: 16px;
    font-weight: 800;
}

/* ==========================================
   CART PAGE
   ========================================== */
.store-cart-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

.store-cart-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
    align-items: center;
}

.store-cart-item-img {
    width: 75px;
    height: 75px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.store-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.store-cart-item-info { flex: 1; min-width: 0; }

.store-cart-item-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-cart-item-cat {
    font-size: 11px;
    color: var(--grey);
    margin-bottom: 8px;
}

.store-cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.store-cart-item-price { font-size: 16px; font-weight: 800; }

.store-cart-item-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
}

.store-cart-item-qty button {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
}

.store-cart-item-qty span {
    width: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.store-cart-item-remove {
    border: none;
    background: none;
    color: var(--light-grey);
    cursor: pointer;
    padding: 5px;
    margin-left: 6px;
    font-size: 18px;
    transition: color 0.2s;
}

.store-cart-item-remove:hover { color: #e74c3c; }

/* Cart Summary */
.store-cart-summary {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 20px;
}

.store-cart-summary h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.store-cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.store-cart-summary-row .label { color: var(--grey); }

.store-cart-summary-row.total {
    border-top: 1.5px solid #e0e0e0;
    padding-top: 14px;
    margin-top: 14px;
    font-size: 20px;
    font-weight: 800;
}

.store-cart-summary-row .free { color: #34c759; font-weight: 600; }

.store-checkout-email {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e5e5e5;
    border-radius: 14px;
    font-size: 14px;
    font-family: var(--font);
    margin: 15px 0;
    outline: none;
    transition: border-color 0.2s;
}

.store-checkout-email:focus { border-color: var(--dark); }

.store-checkout-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 30px;
    background: var(--dark);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.store-checkout-btn:hover { background: #333; }

.store-continue-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: var(--grey);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.store-continue-link:hover { color: var(--dark); text-decoration: none; }

/* ==========================================
   EMPTY / RESULT STATES
   ========================================== */
.store-empty { text-align: center; padding: 60px 20px; }
.store-empty i { font-size: 70px; color: #e0e0e0; margin-bottom: 15px; display: block; }
.store-empty h3 { font-size: 18px; font-weight: 700; color: var(--grey); margin-bottom: 20px; }

.store-result { text-align: center; padding: 80px 20px; }
.store-result i { font-size: 80px; display: block; margin-bottom: 15px; }
.store-result i.success { color: #34c759; }
.store-result i.error { color: #ff3b30; }
.store-result h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.store-result p { font-size: 15px; color: var(--grey); max-width: 350px; margin: 0 auto 25px; line-height: 1.6; }

/* ==========================================
   FLASH MESSAGES
   ========================================== */
.store-flash {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 600;
}

.store-flash.success { background: #e8f8ef; color: #1b7a43; }
.store-flash.error { background: #fdecea; color: #c62828; }

/* ==========================================
   BOTTOM NAV (like the screenshot)
   ========================================== */
.store-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 100;
    border-top: 1px solid #f0f0f0;
}

.store-bottom-nav .nav-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--dark);
    font-size: 22px;
    position: relative;
    transition: all 0.2s;
    background: transparent;
}

.store-bottom-nav .nav-item.dark-bg {
    background: var(--dark);
    color: #fff;
}

.store-bottom-nav .nav-item .nav-badge {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ==========================================
   DESKTOP
   ========================================== */
@media (min-width: 768px) {
    .store-app { max-width: 480px; }
    .store-bottom-nav { max-width: 480px; }
}
