/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 35%),
                linear-gradient(120deg, #02040f 0%, #1f2f6e 40%, #2e7ae5 70%, #fcb0c2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    animation: gradientShift 18s ease infinite;
    background-size: 400% 400%;
}

/* ============================================
   HEADER & NAVIGATION (Modern E-commerce Style)
   ============================================ */

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #333;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
}

.header-top {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    min-width: fit-content;
}

.logo i {
    font-size: 1.8rem;
    color: #ff6b35;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 0.5rem 1.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: #ff6b35;
    background: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.15);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: #333;
    padding: 0.5rem 0;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: none;
    border: none;
    color: #ff6b35;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 0.75rem;
}

.search-btn:hover {
    color: #ff5a1f;
    transform: scale(1.15);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
}

.action-btn i {
    font-size: 1.3rem;
}

.header-nav {
    display: flex;
    gap: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 1400px;
    margin: 0 auto;
}

.nav-link {
    flex: 1;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-align: center;
    justify-content: center;
}

.nav-link:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.05);
}

.nav-link.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    background: rgba(255, 107, 53, 0.08);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

.footer {
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 3rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 107, 53, 0.3);
}

.footer p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
    letter-spacing: 0.3px;
}

/* ============================================
   MAIN CONTAINER & SECTIONS
   ============================================ */

.container {
    margin: clamp(1rem, 3vh, 2.5rem) auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
    display: grid;
    grid-template-columns: minmax(320px, 60%) minmax(280px, 40%);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    max-width: 1600px;
    align-items: stretch;
}

.section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px) saturate(130%);
    -webkit-backdrop-filter: blur(24px) saturate(130%);
    border-radius: 24px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 20px 45px rgba(10, 10, 10, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.65);
    min-height: auto;
    height: 100%;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.products-section {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.products-section::-webkit-scrollbar {
    width: 8px;
}

.products-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
}

.products-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff6b35 0%, #ffa500 100%);
    border-radius: 10px;
}

.section:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 107, 53, 0.3);
}

.section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.6rem;
    color: #333;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header i {
    font-size: 2rem;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    max-height: none;
    overflow: visible;
    padding: 0.5rem 0;
}

.product-card {
    border: 1px solid rgba(46, 122, 229, 0.18);
    border-radius: 16px;
    padding: 1.35rem;
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.95) 0%, rgba(238, 245, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(14, 32, 53, 0.1);
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

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

.product-card:hover {
    box-shadow: 0 16px 36px rgba(13, 35, 58, 0.25);
    transform: translateY(-6px);
    border-color: #2e7ae5;
    background: rgba(255, 255, 255, 0.95);
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-radius: 8px;
    padding: 0.5rem;
    position: relative;
    z-index: 2;
}

.product-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #2d3748;
    min-height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 2;
    line-height: 1.4;
}

/* Price Display - Minimalist Style */
.product-price-container {
    background: linear-gradient(135deg, #050c31 0%, #112f91 100%);
    border-radius: 12px;
    padding: 0.85rem;
    margin: 0.75rem 0;
    position: relative;
    z-index: 2;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3), 0 10px 25px rgba(17, 47, 145, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-price-label {
    font-size: 0.7rem;
    color: #cfd8ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    text-align: right;
    font-weight: 600;
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #66ffe3 0%, #2ef0ff 50%, #2e7ae5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-align: right;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.product-discount-note {
    margin: 0.35rem 0 0.75rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 107, 53, 0.12);
    color: #ff6b35;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    align-self: flex-end;
}

.btn {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    color: white;
    margin-top: auto;
    position: relative;
    z-index: 2;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.25);
    border: none;
    border-radius: 8px;
    overflow: hidden;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
}

.btn-add-to-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-add-to-cart:hover::before {
    width: 250px;
    height: 250px;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #ff5a1f 0%, #ff9500 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 107, 53, 0.35);
}

.btn-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.loading {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
    font-style: italic;
    font-size: 1rem;
    font-weight: 500;
}

.error {
    color: #e74c3c;
    padding: 1.25rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    font-size: 0.9rem;
}

/* ============================================
   CART SECTION
   ============================================ */

.cart-section {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.cart-section::-webkit-scrollbar {
    width: 8px;
}

.cart-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
}

.cart-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

#react-cart-root {
    flex: 1;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

.products-grid::-webkit-scrollbar {
    width: 10px;
}

.products-grid::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 10px;
}

.products-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff6b35 0%, #ffa500 100%);
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
}

.products-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff5a1f 0%, #ff9500 100%);
}

/* ============================================
   REACT CART STYLING
   ============================================ */

.cart-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1.25rem;
}

.cart-header {
    border-bottom: 3px solid;
    border-image: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%) 1;
    padding-bottom: 1rem;
}

.cart-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.4);
    animation: bounce 0.6s ease-in-out;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #667eea;
    font-weight: 500;
}

.empty-cart p {
    margin: 0.75rem 0;
    font-size: 1.1rem;
}

.empty-cart-hint {
    font-size: 0.9rem;
    color: #95a5a6;
    font-style: italic;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.cart-list::-webkit-scrollbar {
    width: 8px;
}

.cart-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.cart-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5568d3 0%, #6a3f91 100%);
}

.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1rem;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateX(4px);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
    padding: 0.5rem;
}

.cart-item-details {
    overflow: hidden;
}

.cart-item-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #2d3748;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.price-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem;
    border-radius: 6px;
    align-items: center;
    text-align: center;
}

.original-section {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #ddd;
}

.discount-section {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.1) 100%);
    border: 2px solid #00d4ff;
}

.price-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.discount-label {
    color: #00d4ff;
    font-weight: 700;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.discounted-price {
    color: #00d4ff;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.savings-info {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, #27ae6015 0%, #2ecc7115 100%);
    border-radius: 6px;
    border-left: 3px solid #27ae60;
    margin: 0.5rem 0;
}

.discount-percent {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.7rem;
    white-space: nowrap;
}

.savings-amount {
    color: #27ae60;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

.discount-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #ff6b6b15 0%, #ee5a6f15 100%);
    border-radius: 6px;
    border-left: 3px solid #ff6b6b;
}

.discount-timer.expiring {
    animation: pulse-warning 1s infinite;
    border-left-color: #ffc107;
}

@keyframes pulse-warning {
    0%, 100% {
        background: linear-gradient(135deg, #ff6b6b15 0%, #ee5a6f15 100%);
    }
    50% {
        background: linear-gradient(135deg, #ffc10730 0%, #ffc10730 100%);
    }
}

.discount-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.7rem;
    white-space: nowrap;
}

.timer-text {
    color: #ff6b6b;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.cart-item-controls {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 0.35rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qty-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 6px;
}

.qty-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f91 100%);
    transform: scale(1.1);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-input {
    width: 45px;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2d3748;
    background: none;
    font-family: 'Courier New', monospace;
}

.qty-input:focus {
    outline: none;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

.cart-item-total {
    text-align: right;
    min-width: 70px;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.total-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-end;
}

.total-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.discounted-total {
    margin: 0;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
}

.original-total {
    margin: 0;
    font-size: 0.75rem;
    color: #999;
    text-decoration: line-through;
}

.btn-remove {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.2);
}

.btn-remove:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff3838 100%);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.4);
}

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

.cart-summary {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #ecf0f1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-row.discount-row {
    color: #27ae60;
    font-weight: bold;
}

.discount-amount {
    color: #27ae60;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.original-amount {
    color: #999;
    text-decoration: line-through;
}

.summary-row.total {
    border-top: 2px solid #667eea;
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 1rem;
    font-weight: bold;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 1rem;
    border-radius: 8px;
    color: #00d4ff;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.discount-message {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: #ff6b6b;
    font-weight: bold;
    font-size: 0.95rem;
    animation: blink-discount 1.5s infinite;
}

@keyframes blink-discount {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.cart-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn-checkout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-checkout:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f91 100%);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.btn-checkout:active {
    transform: scale(0.98);
}

.btn-clear {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    flex: 1;
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3);
}

.btn-clear:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff3838 100%);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 107, 107, 0.4);
}

.btn-clear:active {
    transform: scale(0.98);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .section {
        padding: 1.25rem;
        min-height: 550px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 450px;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .header-top {
        padding: 0.75rem 1rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.1rem;
        gap: 0.5rem;
    }

    .logo i {
        font-size: 1.3rem;
    }

    .search-bar {
        order: 3;
        width: 100%;
        flex: unset;
        border-radius: 20px;
    }

    .search-input::placeholder {
        font-size: 0.85rem;
    }

    .header-actions {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .action-btn {
        padding: 0.4rem;
        font-size: 0.7rem;
    }

    .header-nav {
        flex-wrap: wrap;
    }

    .nav-link {
        flex: 1 1 25%;
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .products-section,
    .cart-section {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
        max-height: none;
        padding: 0.25rem;
    }

    .section {
        padding: 1.25rem;
        min-height: auto;
    }

    .section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .product-card {
        display: flex;
        flex-direction: column;
        padding: 0.85rem;
    }

    .product-image {
        height: 130px;
        margin-bottom: 0.75rem;
    }

    .product-title {
        margin: 0 0 0.5rem 0;
        font-size: 0.8rem;
    }

    .product-price-container {
        margin: 0.75rem 0;
        padding: 0.65rem;
    }

    .product-price {
        font-size: 1.15rem;
    }

    .btn-add-to-cart {
        margin-top: 0.75rem;
        padding: 0.75rem 1.2rem;
        font-size: 0.7rem;
    }

    .discount-timer {
        font-size: 0.75rem;
        margin: 0.5rem 0;
    }
}
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .cart-item {
        grid-template-columns: 60px 1fr auto;
        gap: 0.75rem;
    }

    .cart-item-controls {
        grid-column: 2;
    }

    .cart-item-total {
        grid-column: 3;
        order: 5;
    }

    .btn-remove {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 0.5rem;
    }

    .header h1 {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }

    .container {
        margin: 1rem auto;
        padding: 0 0.5rem;
        gap: 1rem;
    }

    .section {
        padding: 1rem;
    }

    .section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .product-card {
        grid-template-columns: 100px 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .product-image {
        height: 100px;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .cart-item {
        grid-template-columns: 50px 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .cart-item-controls {
        grid-column: 1 / -1;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
        gap: 0.5rem;
    }

    .qty-btn {
        flex: 1;
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .qty-input {
        flex: 1;
        width: auto;
    }

    .cart-item-total {
        grid-column: 1 / -1;
        text-align: left;
        min-width: auto;
        font-size: 0.95rem;
    }

    .btn-remove {
        grid-column: 1 / -1;
        width: 100%;
        height: auto;
        padding: 0.5rem;
    }

    .cart-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .cart-summary {
        padding: 1rem;
    }

    .summary-row {
        font-size: 0.9rem;
    }

    .summary-row.total {
        font-size: 1.1rem;
    }
}

/* ============================================
   CHECKOUT / DELIVERY MODAL
   ============================================ */

.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
    overflow-y: auto;
}

.checkout-modal.hidden {
    display: none;
}

.checkout-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

/* Checkout Form Styling */
.checkout-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background: #f9f9f9;
}

.form-group legend {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    padding: 0 0.5rem;
    margin-left: -0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.form-col.full-width {
    grid-column: 1 / -1;
}

.checkout-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.checkout-form input[type="text"],
.checkout-form input[type="tel"],
.checkout-form input[type="email"],
.checkout-form textarea {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.checkout-form input[type="text"]:focus,
.checkout-form input[type="tel"]:focus,
.checkout-form input[type="email"]:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #f9f9ff;
}

/* Field error styling */
.checkout-form input.field-invalid,
.checkout-form textarea.field-invalid {
    border: 2px solid #e74c3c;
    border-bottom: 3px dashed #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.field-error {
    display: none;
    color: #c0392b;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
    padding-left: 0.25rem;
}

.field-error.show {
    display: block;
    animation: slideDown 0.2s ease;
}

.field-tip {
    display: block;
    color: #7f8c8d;
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 0.25rem;
    padding-left: 0.25rem;
}

.checkout-form textarea {
    resize: vertical;
}

/* Radio buttons for payment type */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.radio-label:hover {
    border-color: #667eea;
    background: #f9f9ff;
}

.radio-label input[type="radio"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.radio-label span {
    font-size: 0.95rem;
    color: #333;
}

/* Autocomplete suggestions dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 150px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-size: 0.9rem;
}

.suggestion-item:hover {
    background: #fff5f0;
    color: #ff6b35;
    padding-left: 1.2rem;
    font-weight: 600;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.form-col {
    position: relative;
}

/* Form Actions */
.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e0e0e0;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    color: white;
    border: none;
    padding: 1rem 1.8rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1);
}

.btn-secondary {
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
    color: #333;
    border: 2px solid #ff6b35;
    padding: 1rem 1.8rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #fff9f5 0%, #ffe8d6 100%);
    border-color: #ff6b35;
    color: #ff6b35;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.2);
}

/* Error & Success Notifications */
.checkout-error {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fadbd8;
    border: 2px solid #e74c3c;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #c0392b;
    animation: slideDown 0.3s ease;
}

.checkout-error i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.checkout-error span {
    flex-grow: 1;
    font-weight: 500;
}

.close-error {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

.checkout-success {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 500px;
    animation: slideDown 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.success-content i {
    font-size: 3rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.success-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: #27ae60;
}

.success-content p {
    margin: 0.75rem 0;
    font-size: 0.95rem;
    color: #333;
}

.address-summary,
.contact-summary,
.payment-summary {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: left;
    border-left: 4px solid #27ae60;
    font-size: 0.9rem;
    line-height: 1.6;
}

.refresh-message {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-container {
        margin: 0;
        border-radius: 8px;
    }

    .checkout-header {
        padding: 1rem;
    }

    .checkout-form {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }

    .success-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* ============================================
   ACCOUNT & NAVIGATION MODALS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.modal-header i {
    margin-right: 0.75rem;
    color: #ff6b35;
}

.modal-header .close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.modal-header .close-btn:hover {
    color: #ff6b35;
}

/* Account Modal Styling */
.account-modal-content {
    max-width: 450px;
}

.account-modal-content .modal-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
}

.account-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.account-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.account-form .form-group label i {
    color: #ff6b35;
    font-size: 1rem;
}

.account-form input {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.account-form input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background: #fff9f5;
}

.account-form .field-tip {
    display: block;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-top: 0.4rem;
}

.checkbox-group {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.2s ease;
}

.checkbox-label:last-child {
    margin-bottom: 0;
}

.checkbox-label:hover {
    color: #ff6b35;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff6b35;
}

.success-message {
    text-align: center;
    padding: 2rem 1rem;
}

.success-icon {
    font-size: 3rem;
    color: #27ae60;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease;
}

.success-message h3 {
    font-size: 1.3rem;
    color: #27ae60;
    margin: 0 0 1rem 0;
}

.success-message p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.95rem;
}

/* Help Modal Styling */
.help-modal-content {
    max-width: 600px;
}

.help-modal-content .modal-header {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.1) 0%, rgba(255, 107, 53, 0.05) 100%);
}

.help-content {
    padding: 1.5rem;
}

.help-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s ease;
}

.help-section:hover {
    background: #f0f8ff;
    border-left-color: #ff6b35;
}

.help-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.help-section i {
    color: #ff6b35;
    font-size: 1.2rem;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-list li {
    padding: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-list li strong {
    color: #333;
    font-weight: 600;
}

/* ============================================
   HELP TOOLTIP
   ============================================ */

.help-tooltip {
    position: fixed;
    display: none;
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Position tooltip near help button */
.action-btn:nth-child(2) ~ .help-tooltip,
[title="Help"] ~ .help-tooltip {
    top: 65px;
    right: 20px;
}

.tooltip-content {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #ff6b35;
}

.tooltip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.tooltip-item:last-of-type {
    border-bottom: none;
}

.tooltip-item i {
    color: #ff6b35;
    font-size: 1rem;
    min-width: 20px;
}

.tooltip-item span {
    flex: 1;
}

.tooltip-footer {
    padding-top: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
}

/* ============================================
   CATEGORY HEADER
   ============================================ */

.category-header {
    grid-column: 1 / -1;
    padding: 1.5rem 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1rem;
}

.category-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #333;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Smooth transition for filter changes */
.products-grid {
    transition: opacity 0.3s ease;
}

/* Mobile adjustments for modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .tooltip-content {
        min-width: 250px;
    }
    
    .help-section {
        padding: 1rem;
    }
    
    .help-section h3 {
        font-size: 1rem;
    }
    
    .help-list li {
        font-size: 0.85rem;
    }
}

