/* Modern E-Commerce Styles */

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

/* Global Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Modern Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.product-card .image-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f9fafb;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card .content {
    padding: 20px;
}

.product-card .category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.product-card:hover .wishlist-btn {
    opacity: 1;
    transform: translateY(0);
}

.product-card .wishlist-btn:hover {
    background: #FF6B35;
    color: white;
    transform: scale(1.1);
}

.product-card .title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.product-card .price {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.product-card .original-price {
    font-size: 16px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-card .stock-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.product-card .stock-badge.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.product-card .stock-badge.low-stock {
    background: #fef3c7;
    color: #92400e;
}

.product-card .stock-badge.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.product-card .add-to-cart-btn {
    width: 100%;
    background: #111827;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .add-to-cart-btn:hover {
    background: #FF6B35;
    transform: translateY(-1px);
}

.product-card .add-to-cart-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Modern Cart Styles */
.cart-sidebar {
    width: 384px !important;
    max-width: 90vw;
}

.cart-item {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    align-items: flex-start;
    gap: 12px;
}

.cart-item:hover {
    background: #f9fafb;
}

.cart-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

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

.cart-item-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.cart-item-price {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    border-color: #FF6B35;
    background: #FF6B35;
    color: white;
}

.quantity-display {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: #fee2e2;
}

/* Modern Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

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

.form-input:invalid {
    border-color: #ef4444;
}

.form-input.border-red-500 {
    border-color: #ef4444 !important;
}

.field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Modern Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    min-height: 44px;
}

.btn-primary {
    background: #FF6B35;
    color: white;
}

.btn-primary:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: #111827;
    color: white;
}

.btn-secondary:hover {
    background: #374151;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #111827;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background: #111827;
    color: white;
    border-color: #111827;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Modern Toast Notifications */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    z-index: 9999;
    border-left: 4px solid #10b981;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    min-width: 300px;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-text {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.toast-message {
    color: #6b7280;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

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

/* Modern Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    animation: scaleIn 0.2s ease;
}

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

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

/* Checkout Styles */
.checkout-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid #f3f4f6;
    transition: all 0.3s ease;
}

.checkout-section.active {
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.checkout-step {
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.checkout-section.active .checkout-step {
    background: #FF6B35;
    color: white;
}

.checkout-section.completed .checkout-step {
    background: #10b981;
    color: white;
}

.checkout-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.order-summary {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid #f3f4f6;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.summary-row:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.summary-row.total {
    font-weight: 700;
    font-size: 18px;
    color: #111827;
    border-top: 2px solid #e5e7eb;
    padding-top: 16px;
    margin-top: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-card .content {
        padding: 16px;
    }
    
    .product-card .image-container {
        height: 200px;
    }
    
    .toast {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
    
    .checkout-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .btn {
        padding: 14px 20px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-card .image-container {
        height: 180px;
    }
    
    .cart-sidebar {
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .cart-item img {
        width: 100%;
        height: 120px;
    }
    
    .quantity-controls {
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #111827;
        color: #f9fafb;
    }
    
    .product-card {
        background: #1f2937;
        border: 1px solid #374151;
    }
    
    .product-card .title {
        color: #f9fafb;
    }
    
    .product-card .description {
        color: #d1d5db;
    }
    
    .form-input, .form-select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .checkout-section {
        background: #1f2937;
        border-color: #374151;
    }
    
    .order-summary {
        background: #111827;
        border-color: #374151;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles */
.focus-visible:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid currentColor;
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
    
    .form-input, .form-select {
        border: 2px solid currentColor;
    }
}