/* Modern CubeNet Design Enhancements */
/* This file enhances the existing design with modern touches for checkout and forms */

/* Override fixed width for full-width responsive layout */
body {
    min-width: 0 !important;
    width: 100% !important;
}

body > article {
    width: 100% !important;
    max-width: 100% !important;
}

/* Keep nav and header centered with max-width */
header > section,
nav ul {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

:root {
    /* Color Palette */
    --primary: #FF9900;
    --primary-dark: #E68A00;
    --primary-light: #FFB133;
    --secondary: #2d555e;
    --secondary-dark: #1e3a41;
    --accent: #00d4ff;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Status Colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --info: #3b82f6;
    --info-bg: #dbeafe;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Cards - Only for checkout/forms */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 153, 0, 0.05), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

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

/* Checkout Grid */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

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

/* Alert/Message Boxes */
.alert {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid;
    animation: fadeIn 0.4s ease-out;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success);
    color: #065f46;
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error);
    color: #991b1b;
}

.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info);
    color: #1e40af;
}

/* Payment Method Cards */
.payment-method-option {
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.payment-method-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 153, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

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

.payment-method-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.payment-method-option input[type="radio"]:checked {
    accent-color: var(--primary);
}

/* Modern Input Focus */
input:focus,
select:focus,
textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
    }
}

/* Loading Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    animation: pulse 2s ease-in-out infinite;
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Selection Color */
::selection {
    background: var(--primary);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary);
    color: var(--white);
}

/* Feature Cards Hover Effect */
.key-features > div:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,153,0,0.5) !important;
    box-shadow: 0 10px 30px rgba(255,153,0,0.2);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .key-features {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 1.5rem !important;
    }

    .why-choose-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

@media (max-width: 768px) {
    header > section,
    nav ul {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .hero-section {
        padding: 3rem 1.5rem 2rem !important;
    }

    .hero-section h1 {
        font-size: 2rem !important;
    }

    .hero-section p {
        font-size: 1rem !important;
    }

    .key-features {
        margin: 2rem 0 3rem !important;
        padding: 0 1rem !important;
    }

    .key-features > div {
        padding: 1.5rem 1rem !important;
    }

    .why-choose-grid {
        gap: 2rem !important;
    }

    section.xmas-plans {
        padding: 0 1rem !important;
    }

    /* Make checkout page responsive too */
    .checkout-grid {
        padding: 0 1rem !important;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem !important;
    }

    .hero-section p {
        font-size: 0.9rem !important;
    }
}

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