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

:root {
    --bg-primary: #f5f7fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #e5e7eb;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 30px;
    --radius-pill: 999px;
    
    /* Animation timing functions */
    --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   GLOBAL ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
    }
}

/* ============================================
   BODY & CONTAINER
   ============================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden;
    animation: fadeIn 0.4s var(--ease-premium);
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    animation: fadeIn 0.5s var(--ease-premium);
}

/* ============================================
   SEARCH INPUT - PREMIUM STYLE
   ============================================ */

.search-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s var(--ease-premium);
    box-shadow: var(--shadow);
    position: relative;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 
                0 8px 24px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Search icon animation */
.search-input-wrapper {
    position: relative;
    animation: slideInUp 0.5s var(--ease-premium) 0.1s both;
}

.search-input-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: transform 0.3s var(--ease-spring);
    z-index: 1;
}

.search-input-wrapper:focus-within::before {
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   HEADER - ANIMATED
   ============================================ */

header {
    background: var(--bg-card);
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    animation: slideInUp 0.4s var(--ease-premium);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    animation: fadeIn 0.6s var(--ease-premium) 0.2s both;
}

/* ============================================
   TABS - SMOOTH TRANSITIONS
   ============================================ */

.tabs {
    display: flex;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 56px;
    z-index: 99;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    animation: slideInUp 0.5s var(--ease-premium) 0.1s both;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-premium);
    border-bottom: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.4s var(--ease-premium);
    transform: translateX(-50%);
}

.tab:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.tab.active {
    color: var(--accent);
}

.tab.active::before {
    width: 100%;
}

/* Tab content animations */
.tab-content {
    display: none;
    padding: 16px 0;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s var(--ease-premium);
}

/* ============================================
   PRODUCT GRID - STAGGERED ANIMATIONS
   ============================================ */

.product-grid {
    display: grid;
    gap: 16px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.4s var(--ease-premium);
    position: relative;
    animation: scaleIn 0.5s var(--ease-premium) both;
}

/* Staggered animation for product cards */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s var(--ease-premium);
    z-index: 1;
    pointer-events: none;
}

.product-card:hover::before {
    left: 100%;
}

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

@media (hover: hover) {
    .product-card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
        transform: translateY(-6px);
    }
}

/* ============================================
   PRODUCT IMAGE - ZOOM & OVERLAY EFFECTS
   ============================================ */

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-premium);
}

.product-card:hover .product-image::after {
    opacity: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-premium);
    will-change: transform;
}

@media (hover: hover) {
    .product-card:hover .product-image img {
        transform: scale(1.08);
    }
}

/* ============================================
   PRODUCT INFO - SMOOTH REVEALS
   ============================================ */

.product-info {
    padding: 16px;
    position: relative;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    transition: color 0.3s var(--ease-premium);
}

.product-card:hover .product-name {
    color: var(--accent);
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    animation: fadeIn 0.5s var(--ease-premium);
}

.old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-right: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.discount-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    animation: pulse 2s ease-in-out infinite;
    display: inline-block;
}

.product-sizes {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeIn 0.5s var(--ease-premium) 0.2s forwards;
}

.product-stock {
    font-size: 0.75rem;
    color: var(--success);
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeIn 0.5s var(--ease-premium) 0.3s forwards;
}

/* ============================================
   SIZE SELECTOR - INTERACTIVE BUTTONS
   ============================================ */

.size-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    animation: slideInUp 0.5s var(--ease-premium) 0.2s both;
}

.size-btn {
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-premium);
    position: relative;
    overflow: hidden;
}

.size-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-premium), height 0.4s var(--ease-premium);
}

.size-btn:hover::before {
    width: 120%;
    height: 200%;
}

.size-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.size-btn.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    animation: scaleIn 0.3s var(--ease-spring);
}

.size-btn:active {
    transform: scale(0.95);
}

/* ============================================
   QUANTITY SELECTOR - SMOOTH INTERACTIONS
   ============================================ */

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    animation: slideInUp 0.5s var(--ease-premium) 0.3s both;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-premium);
    position: relative;
    overflow: hidden;
}

.qty-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-premium), height 0.3s var(--ease-premium);
    opacity: 0.2;
}

.qty-btn:active::after {
    width: 100%;
    height: 100%;
}

.qty-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-value {
    font-size: 1rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    transition: all 0.3s var(--ease-spring);
}

/* Number change animation */
@keyframes numberPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.qty-value.changing {
    animation: numberPop 0.3s var(--ease-spring);
}

/* ============================================
   BUTTONS - PREMIUM INTERACTIONS
   ============================================ */

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    position: relative;
    overflow: hidden;
}

/* Ripple effect for all buttons */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    animation: slideInUp 0.5s var(--ease-premium) 0.4s both;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-primary);
    transition: all 0.3s var(--ease-premium);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

/* ============================================
   SHARE BUTTON - FLOATING ANIMATION
   ============================================ */

.share-corner-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s var(--ease-premium);
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.share-corner-btn:hover {
    transform: scale(1.15) rotate(12deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    color: var(--accent);
    background: rgba(255, 255, 255, 1);
}

.share-corner-btn:active {
    transform: scale(0.9);
}

/* ============================================
   CART ITEM - SMOOTH SLIDE-IN
   ============================================ */

.cart-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all 0.4s var(--ease-premium);
    animation: slideInRight 0.4s var(--ease-premium) both;
}

/* Staggered cart items */
.cart-item:nth-child(1) { animation-delay: 0.05s; }
.cart-item:nth-child(2) { animation-delay: 0.1s; }
.cart-item:nth-child(3) { animation-delay: 0.15s; }
.cart-item:nth-child(4) { animation-delay: 0.2s; }

.cart-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.cart-item:active {
    transform: scale(0.98);
}

.cart-item-image {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease-premium);
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.1);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.cart-item:hover .cart-item-name {
    color: var(--accent);
}

.cart-item-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cart-item-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
    margin-top: 4px;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-premium);
}

.cart-item-remove:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.cart-item-remove:active {
    transform: rotate(90deg) scale(0.9);
}

/* ============================================
   CART SUMMARY - SLIDE UP ANIMATION
   ============================================ */

.cart-summary {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 16px;
    box-shadow: var(--shadow-lg);
    animation: slideInUp 0.5s var(--ease-premium) 0.3s both;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
    animation: fadeIn 0.5s var(--ease-premium) both;
}

.summary-row:nth-child(1) { animation-delay: 0.4s; }
.summary-row:nth-child(2) { animation-delay: 0.45s; }
.summary-row:nth-child(3) { animation-delay: 0.5s; }

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    padding-top: 12px;
    border-top: 2px solid var(--border);
    margin-top: 8px;
}

/* ============================================
   FORM ELEMENTS - MODERN INPUTS
   ============================================ */

.form-group {
    margin-bottom: 16px;
    animation: slideInUp 0.5s var(--ease-premium) both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s var(--ease-premium);
    background: var(--bg-card);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   UPLOAD AREA - INTERACTIVE
   ============================================ */

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    background: var(--bg-primary);
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(99, 102, 241, 0.1), 
        transparent);
    transition: left 0.5s var(--ease-premium);
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.02);
}

.upload-area:active {
    transform: scale(0.98);
}

/* ============================================
   PAYMENT METHODS - CARD STYLE
   ============================================ */

.payment-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: slideInUp 0.5s var(--ease-premium) 0.2s both;
}

.payment-method-btn {
    flex: 1;
    padding: 20px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.4s var(--ease-premium);
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.payment-method-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-premium);
}

.payment-method-btn:hover::before {
    opacity: 1;
}

.payment-method-btn:hover {
    border-color: var(--accent);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.payment-method-btn.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.payment-method-btn.payme:hover {
    border-color: #00CDAC;
    background: rgba(0, 205, 172, 0.05);
}

.payment-method-btn.click:hover {
    border-color: #0066FF;
    background: rgba(0, 102, 255, 0.05);
}

/* ============================================
   RECEIPT UPLOAD
   ============================================ */

.receipt-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    background: var(--bg-primary);
    margin-top: 8px;
}

.receipt-upload-area:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.02);
}

.receipt-upload-area.has-image {
    border-style: solid;
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
    animation: pulse 0.5s var(--ease-premium);
}

/* ============================================
   PAYMENT CARD - 3D EFFECT
   ============================================ */

.payment-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    padding: 28px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
    transition: all 0.4s var(--ease-premium);
    animation: slideInUp 0.5s var(--ease-premium) 0.2s both;
    position: relative;
    overflow: hidden;
}

.payment-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.payment-card:hover {
    transform: translateY(-6px) rotateX(5deg);
    box-shadow: 0 16px 48px rgba(102, 126, 234, 0.5);
}

.payment-card-number {
    font-size: 1.35rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.payment-card-holder {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 16px;
    transition: all 0.3s var(--ease-premium);
    backdrop-filter: blur(10px);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* ============================================
   ORDER ITEM - ELEGANT CARDS
   ============================================ */

.order-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: all 0.4s var(--ease-premium);
    cursor: pointer;
    animation: scaleIn 0.5s var(--ease-premium) both;
    border-left: 4px solid transparent;
}

.order-item:nth-child(1) { animation-delay: 0.05s; }
.order-item:nth-child(2) { animation-delay: 0.1s; }
.order-item:nth-child(3) { animation-delay: 0.15s; }

.order-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px) translateX(4px);
    border-left-color: var(--accent);
}

.order-item:active {
    transform: scale(0.98);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-id {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.order-status {
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-premium);
    animation: fadeIn 0.5s var(--ease-premium);
}

.status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.status-confirmed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-shipped {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.status-delivered {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-cancelled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.order-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */

.lang-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    animation: slideInUp 0.5s var(--ease-premium) 0.2s both;
}

.lang-btn {
    padding: 12px 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-premium);
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-premium), height 0.4s var(--ease-premium);
    opacity: 0.1;
}

.lang-btn:hover::before {
    width: 200%;
    height: 200%;
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    animation: scaleIn 0.3s var(--ease-spring);
}

/* ============================================
   BOTTOM NAVIGATION - FLOATING EFFECT
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    backdrop-filter: none;
    border-top: 1px solid rgba(229, 231, 235, 0.9);
    display: flex;
    padding: 10px 0 12px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    animation: slideInUp 0.5s var(--ease-premium) 0.4s both;
}

.dark .bottom-nav {
    background: rgba(17, 22, 33, 0.92);
    backdrop-filter: blur(20px);
    border-top-color: rgba(255, 255, 255, 0.08);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    border: none;
    background: transparent;
    transition: all 0.3s var(--ease-premium);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 3px 3px;
    transform: translateX(-50%);
    transition: width 0.3s var(--ease-premium);
}

.nav-item.active::before {
    width: 60%;
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-item.active {
    color: var(--accent);
}

.nav-item-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    display: block;
    transition: all 0.3s var(--ease-premium);
}

.nav-item.active .nav-item-icon {
    animation: float 2s ease-in-out infinite;
}

.nav-item:hover .nav-item-icon {
    transform: scale(1.1);
}

/* ============================================
   BADGE - NOTIFICATION STYLE
   ============================================ */

.badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius);
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(24px);
    min-width: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.4);
    animation: badge-pop 0.4s var(--ease-spring);
}

@keyframes badge-pop {
    0% { 
        transform: translateX(24px) scale(0); 
        opacity: 0;
    }
    50% { 
        transform: translateX(24px) scale(1.3); 
    }
    100% { 
        transform: translateX(24px) scale(1); 
        opacity: 1;
    }
}

/* ============================================
   MODAL - SMOOTH OVERLAY
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.3s var(--ease-premium);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s var(--ease-spring);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-primary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s var(--ease-premium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* ============================================
   TOAST NOTIFICATIONS - MODERN STYLE
   ============================================ */

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: all 0.4s var(--ease-premium);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: float 2s ease-in-out infinite;
}

.toast.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* ============================================
   SKELETON LOADERS - SHIMMER EFFECT
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-primary) 25%,
        var(--border) 50%,
        var(--bg-primary) 75%,
        var(--border) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s var(--ease-premium);
}

.skeleton-image {
    width: 100%;
    height: 220px;
}

.skeleton-text {
    height: 18px;
    margin: 16px;
    border-radius: 4px;
}

.skeleton-text-sm {
    height: 14px;
    width: 60%;
    margin: 10px 16px 16px;
    border-radius: 4px;
}

/* ============================================
   ADD TO CART ANIMATION
   ============================================ */

.added-to-cart-animation {
    animation: add-bounce 0.5s var(--ease-spring);
}

@keyframes add-bounce {
    0% { transform: scale(1); }
    20% { transform: scale(0.92); }
    40% { transform: scale(1.05); }
    60% { transform: scale(0.98); }
    80% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Flying item to cart animation */
@keyframes flyToCart {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(var(--tx), var(--ty)) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.2);
    }
}

.flying-item {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    animation: flyToCart 0.8s var(--ease-premium) forwards;
}

/* ============================================
   LOADING SPINNER - PREMIUM STYLE
   ============================================ */

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s var(--ease-premium);
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-card: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --border: #334155;
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    
    header {
        background: rgba(30, 41, 59, 0.95);
    }
    
    .tabs {
        background: rgba(30, 41, 59, 0.95);
    }
    
    .bottom-nav {
        background: rgba(30, 41, 59, 0.95);
    }
    
    .share-corner-btn {
        background: rgba(30, 41, 59, 0.9);
    }
    
    .spinner-overlay {
        background: rgba(15, 23, 42, 0.9);
    }
}

/* ============================================
   UTILITY ANIMATIONS
   ============================================ */

.fade-in {
    animation: fadeIn 0.5s var(--ease-premium);
}

.slide-in-up {
    animation: slideInUp 0.5s var(--ease-premium);
}

.slide-in-right {
    animation: slideInRight 0.5s var(--ease-premium);
}

.scale-in {
    animation: scaleIn 0.5s var(--ease-premium);
}

.bounce {
    animation: add-bounce 0.5s var(--ease-spring);
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Click shrink effect */
.click-shrink:active {
    transform: scale(0.96);
}

/* ============================================
   RESPONSIVE OPTIMIZATIONS
   ============================================ */

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* GPU acceleration for smooth animations */
.product-card,
.cart-item,
.order-item,
.btn,
.nav-item {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   EMPTY STATE ICON ANIMATIONS
   ============================================ */

/* Базовая анимация для иконок пустого состояния */
@keyframes emptyStateFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    25% {
        transform: translateY(-8px) scale(1.02);
    }
    50% {
        transform: translateY(-12px) scale(1.05);
    }
    75% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes emptyStatePulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.08);
    }
}

@keyframes emptyStateRotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-5deg) scale(1.05);
    }
    75% {
        transform: rotate(5deg) scale(1.05);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

@keyframes emptyStateBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    10% {
        transform: translateY(-15px) scale(1.08);
    }
    30% {
        transform: translateY(0) scale(0.95);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
    70% {
        transform: translateY(0) scale(0.98);
    }
}

@keyframes emptyStateGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0px rgba(156, 163, 175, 0));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(156, 163, 175, 0.5));
    }
}

@keyframes emptyStateFadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Класс для иконок пустого состояния */
.empty-state-icon {
    display: inline-block;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Анимации запускаются только после добавления класса .animate */
}

/* Активация анимаций после загрузки раздела */
.empty-state-icon.animate {
    animation: 
        emptyStateFadeInScale 0.8s var(--ease-spring) forwards,
        emptyStateFloat 3s ease-in-out 0.8s infinite,
        emptyStatePulse 2s ease-in-out 0.8s infinite,
        emptyStateGlow 3s ease-in-out 0.8s infinite;
}

/* Специфичные анимации для разных иконок */
.empty-state-icon.cart-icon.animate {
    animation: 
        emptyStateFadeInScale 0.8s var(--ease-spring) forwards,
        emptyStateFloat 3.5s ease-in-out 0.8s infinite,
        emptyStatePulse 2.5s ease-in-out 0.8s infinite,
        emptyStateGlow 3.5s ease-in-out 0.8s infinite;
}

.empty-state-icon.orders-icon.animate {
    animation: 
        emptyStateFadeInScale 0.8s var(--ease-spring) forwards,
        emptyStateRotate 4s ease-in-out 0.8s infinite,
        emptyStatePulse 2s ease-in-out 0.8s infinite,
        emptyStateGlow 4s ease-in-out 0.8s infinite;
}

.empty-state-icon.camera-icon.animate {
    animation: 
        emptyStateFadeInScale 0.8s var(--ease-spring) forwards,
        emptyStateBounce 2s ease-in-out 0.8s infinite,
        emptyStateGlow 3s ease-in-out 0.8s infinite;
}

/* Анимация сердца для пустого состояния Избранного */
@keyframes emptyStateHeartbeat {
    0%, 100% { transform: scale(1); }
    14%       { transform: scale(1.18); }
    28%       { transform: scale(1); }
    42%       { transform: scale(1.12); }
    56%       { transform: scale(1); }
}

.empty-state-icon.wishlist-icon.animate {
    animation:
        emptyStateFadeInScale 0.8s var(--ease-spring) forwards,
        emptyStateHeartbeat 1.8s ease-in-out 0.8s infinite;
}

/* Dark mode поддержка для анимаций */
@media (prefers-color-scheme: dark) {
    @keyframes emptyStateGlow {
        0%, 100% {
            filter: drop-shadow(0 0 0px rgba(156, 163, 175, 0));
        }
        50% {
            filter: drop-shadow(0 0 25px rgba(156, 163, 175, 0.6));
        }
    }
}

/* ==========================================================================
   Desktop (>=1024px) e-commerce layout
   Mobile and tablet layouts are untouched below this point.
   ========================================================================== */
@media (min-width: 1024px) {

    /* Hero banner: wide, cinematic aspect ratio instead of the mobile card ratio */
    .hero-banner {
        aspect-ratio: 21 / 7;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Reclaim the space reserved for the mobile bottom nav bar */
    #appScrollRoot {
        padding-bottom: 0 !important;
    }

    /* Desktop header: icon buttons get a subtle scale on hover */
    .desktop-icon-btn {
        transition: transform 220ms ease, background-color 220ms ease, color 220ms ease;
    }
    .desktop-icon-btn:hover {
        transform: scale(1.08);
    }
    .desktop-icon-btn svg {
        transition: transform 220ms ease;
    }

    /* Desktop category nav links */
    .desktop-nav-link {
        transition: background-color 220ms ease, color 220ms ease;
    }

    /* Expandable inline search field in the desktop header — single solid pill */
    #desktopSearchWrap {
        background-color: transparent;
        overflow: hidden;
    }
    #desktopSearchWrap:not(.is-open):hover {
        background-color: rgb(243 244 246);
    }
    .dark #desktopSearchWrap:not(.is-open):hover {
        background-color: rgb(31 41 55);
    }
    #desktopSearchWrap.is-open {
        background-color: rgb(243 244 246);
    }
    .dark #desktopSearchWrap.is-open {
        background-color: rgb(31 41 55);
    }
    #desktopSearchInput {
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Product cards: more noticeable lift + shadow on hover */
    .product-card {
        transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
    }
    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
        border-color: transparent;
    }

    /* Primary buttons inside cards: smoother color transition */
    .product-card button.bg-primary,
    .product-card .bg-primary {
        transition: background-color 220ms ease, transform 220ms ease;
    }

    /* Category chips / home category cards get a touch more lift on desktop */
    .home-category-card {
        transition: transform 220ms ease, box-shadow 220ms ease;
    }
    .home-category-card:hover {
        transform: translateY(-4px);
    }
}
