/* ===== CSS VARIABLES (THEME) ===== */
:root {
    --background: #0b0e14;
    --foreground: #e8e9ed;
    --card: #0f1220;
    --primary: #7c6cd6;
    --secondary: #4a5fcc;
    --muted: #1a1e2e;
    --muted-foreground: #9ca3af;
    --border: rgba(124, 108, 214, 0.1);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

/* ===== BASE & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

button {
    font-family: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

.bg-card { background-color: var(--card); }
.bg-muted { background-color: var(--muted); }
.bg-primary { background-color: var(--primary); }
.bg-success { background: linear-gradient(135deg, var(--success) 0%, #34d399 100%); }
.bg-error { background: linear-gradient(135deg, var(--error) 0%, #f87171 100%); }

.border-border { border-color: var(--border); }

/* ===== INDEX.PHP STYLES ===== */

/* Header/Navbar */
.navbar {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background-color: rgba(15, 18, 32, 0.8);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    font-family: 'Poppins', sans-serif;
}

.navbar nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.navbar a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.navbar a:hover {
    color: var(--foreground);
}

/* Hero Section */
.hero {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, var(--background) 0%, var(--card) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(124, 108, 214, 0.1) 0%, transparent 50%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.chips span {
    background-color: rgba(124, 108, 214, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-box {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--muted) 0%, var(--card) 100%);
    border: 1px solid var(--border);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Products Section */
.products {
    padding: 5rem 1rem;
}

.products h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--foreground);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(124, 108, 214, 0.15);
}

.product-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 10px 30px rgba(124, 108, 214, 0.2);
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: var(--muted);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.product-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.desc {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.product-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-card li {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.875rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.product-card .btn-primary {
    width: 100%;
    margin-top: auto;
}

/* Features Section */
.features {
    padding: 5rem 1rem;
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-grid > div {
    text-align: center;
    padding: 2rem;
    background-color: var(--card);
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-grid > div:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.feature-grid h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.feature-grid p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    padding: 3rem 1rem;
    background-color: var(--card);
    border-top: 1px solid var(--border);
}

.footer-flex {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.disclaimer {
    font-size: 0.875rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* ===== COMMON COMPONENTS ===== */

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 108, 214, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background-color: var(--muted);
    border-color: var(--primary);
    color: var(--primary);
}

/* Form Elements */
input, textarea, select {
    background-color: var(--muted);
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
    transition: all 0.3s;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 108, 214, 0.1);
}

input::placeholder, textarea::placeholder {
    color: var(--muted-foreground);
    opacity: 0.7;
}

/* Radio Options */
.radio-option {
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    padding: 1rem;
    background-color: var(--card);
}

.radio-option:hover {
    border-color: var(--primary);
    background-color: rgba(124, 108, 214, 0.05);
}

.radio-option.selected {
    border-color: var(--primary);
    background-color: rgba(124, 108, 214, 0.1);
    box-shadow: 0 0 0 1px var(--primary);
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
}

/* Cards & Containers */
.rounded-xl {
    border-radius: 1rem;
}

.border {
    border: 1px solid var(--border);
}

.border-t {
    border-top: 1px solid var(--border);
}

.border-b {
    border-bottom: 1px solid var(--border);
}

/* Alerts & Messages */
.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    background-color: rgba(26, 30, 46, 0.5);
    transition: all 0.3s;
    border-radius: 1rem;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(124, 108, 214, 0.05);
    transform: translateY(-2px);
}

/* Preview Container */
#preview:not(.show) {
    display: none;
}

#preview.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Success Animation */
.success-checkmark {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
}

.checkmark {
    width: 80px;
    height: 80px;
    animation: scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke: var(--primary);
    stroke-width: 2;
    stroke-miterlimit: 10;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
    fill: none;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-miterlimit: 10;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Progress Steps */
.w-8.h-8.rounded-full {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Timer Animation */
.timer {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-ring {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* QR Code Container */
.pulse-ring + .relative {
    overflow: hidden;
}

.pulse-ring + .relative img {
    mix-blend-mode: multiply;
}

/* ===== CHECKOUT.PHP SPECIFIC ===== */
.min-h-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header.sticky {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sticky.top-24 {
    top: 6rem;
}

/* Grid Layouts */
.grid {
    display: grid;
}

.gap-8 {
    gap: 2rem;
}

/* Form Spacing */
.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* ===== CONFIRM.PHP SPECIFIC ===== */
.upload-area svg {
    transition: transform 0.3s;
}

.upload-area:hover svg {
    transform: translateY(-2px);
}

/* File Preview */
#previewImage {
    object-fit: cover;
    border-radius: 0.5rem;
}

/* ===== PAYMENT.PHP SPECIFIC ===== */
/* Timer Warning */
@keyframes timerWarning {
    0%, 100% {
        color: var(--foreground);
    }
    50% {
        color: var(--warning);
    }
}

.timer-warning {
    animation: timerWarning 1s ease-in-out infinite;
}

/* UPI Link Button */
a[href^="upi://"] {
    transition: all 0.3s;
}

a[href^="upi://"]:hover {
    transform: scale(1.05);
}

/* ===== PRODUCT.PHP SPECIFIC ===== */
.main-image {
    transition: opacity 0.3s ease-in-out;
}

.gallery-image {
    transition: all 0.3s;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}

.gallery-image.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

/* Feature List */
.space-y-3 > * + * {
    margin-top: 0.75rem;
}

/* ===== SUCCESS.PHP SPECIFIC ===== */
.select-all {
    user-select: all;
    cursor: text;
}

/* Status Badges */
.inline-flex.items-center.gap-1 {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .products h2 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .nav-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .navbar nav {
        justify-content: center;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .sticky.top-24 {
        position: static;
    }
}

@media (min-width: 640px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-grid {
        gap: 2rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .btn-primary,
    .btn-secondary,
    .upload-area {
        display: none !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0b0e14;
        --foreground: #e8e9ed;
        --card: #0f1220;
        --muted: #1a1e2e;
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--muted);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ===== SELECTION STYLES ===== */
::selection {
    background-color: rgba(124, 108, 214, 0.3);
    color: var(--foreground);
}

/* ===== TRANSITIONS ===== */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* ===== SKELATON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, var(--muted) 25%, var(--card) 50%, var(--muted) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-image {
    height: 200px;
    width: 100%;
}