/* ==========================================================================
   NEWWAVES PROJECTS - CORE FOUNDATION & DESIGN UTILITIES
   Zero Inline Styles Compliant - Complete Layout, Typography, Modal & UI Kit
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap');

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
    min-width: 0;
}

img, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

ul.list-unstyled, ol.list-unstyled {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   CONTAINERS & GRID SYSTEM
   ========================================================================== */

.nw-container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.nw-container-narrow {
    width: 100%;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.nw-container-wide {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.nw-grid {
    display: grid;
    gap: 1.5rem;
}

.nw-grid > *,
.nw-grid-2 > *,
.nw-grid-3 > *,
.nw-grid-4 > *,
.nw-grid-12 > * {
    min-width: 0;
}

.nw-col-span-2,
.nw-col-span-3 {
    grid-column: auto;
}

.nw-grid-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.nw-grid-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.nw-grid-4 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.nw-grid-12 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 640px) {
    .nw-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nw-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
    .nw-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nw-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .nw-col-span-2 { grid-column: span 2 / span 2; }
    .nw-col-span-3 { grid-column: span 3 / span 3; }
}

.nw-col-card {
    width: 100%;
    max-width: 480px;
}

.nw-col-card-wide {
    width: 100%;
    max-width: 780px;
}

.nw-otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.45rem;
}

/* ==========================================================================
   FLEXBOX & ALIGNMENT UTILITIES
   ========================================================================== */

.nw-flex { display: flex; }
.nw-inline-flex { display: inline-flex; }
.nw-flex-col { flex-direction: column; }
.nw-flex-row { flex-direction: row; }
.flex-wrap,
.nw-flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

.nw-items-start { align-items: flex-start; }
.nw-items-center { align-items: center; }
.nw-items-end { align-items: flex-end; }
.nw-items-baseline { align-items: baseline; }
.nw-items-stretch { align-items: stretch; }

.nw-justify-start { justify-content: flex-start; }
.nw-justify-center { justify-content: center; }
.nw-justify-end { justify-content: flex-end; }
.nw-justify-between { justify-content: space-between; }

.nw-gap-1 { gap: 0.5rem; }
.nw-gap-2 { gap: 0.85rem; }
.nw-gap-3 { gap: 1.25rem; }
.nw-gap-4 { gap: 1.75rem; }
.nw-gap-5 { gap: 2.5rem; }

/* ==========================================================================
   SPACING, SIZING & DISPLAY UTILITIES
   ========================================================================== */

.m-0 { margin: 0 !important; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }

.mt-1 { margin-top: 0.35rem; }
.mt-2 { margin-top: 0.65rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2.5rem; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.35rem; }
.mb-2 { margin-bottom: 0.65rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2.5rem; }

.ml-1 { margin-left: 0.35rem; }
.ml-2 { margin-left: 0.65rem; }
.mr-2 { margin-right: 0.65rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.p-0 { padding: 0 !important; }
.p-2 { padding: 0.65rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2.25rem; }

.px-2 { padding-left: 0.65rem; padding-right: 0.65rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3.25rem; padding-bottom: 3.25rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pl-3 { padding-left: 1rem; }

.section-py {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.w-100 { width: 100%; }
.h-100 { height: 100%; }
.max-w-700 { max-width: 720px; }
.max-w-800 { max-width: 820px; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none !important; }
.pointer { cursor: pointer; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ==========================================================================
   TYPOGRAPHY & TEXT UTILITIES
   ========================================================================== */

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: 0.78rem; line-height: 1.45; }
.text-sm { font-size: 0.88rem; line-height: 1.55; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-lg { font-size: 1.15rem; line-height: 1.45; }
.text-xl { font-size: 1.32rem; line-height: 1.35; }
.text-2xl { font-size: 1.75rem; line-height: 1.25; }
.text-3xl { font-size: 2.25rem; line-height: 1.2; }
.text-4xl { font-size: 2.85rem; line-height: 1.15; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.04em; }
.tracking-wider { letter-spacing: 0.08em; }
.leading-relaxed { line-height: 1.75; }
.text-decoration-none { text-decoration: none !important; }
.text-strikethrough { text-decoration: line-through; opacity: 0.65; }

.text-primary { color: var(--accent, #00E5FF); }
.text-secondary { color: var(--text-secondary, #94A3B8); }
.text-muted { color: var(--text-muted, #64748B); }
.text-emerald { color: #10B981; }
.text-amber { color: #F59E0B; }
.text-cyan { color: #00E5FF; }
.text-danger { color: #EF4444; }

/* ==========================================================================
   IMAGES, BORDERS & CARDS
   ========================================================================== */

.nw-img-fluid {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.nw-product-full-img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    display: block;
}

.nw-img-card-sm {
    width: 100%;
    height: 165px;
    object-fit: cover;
    display: block;
}

.rounded { border-radius: var(--radius-md, 12px); }
.rounded-lg { border-radius: var(--radius-lg, 18px); }
.rounded-full { border-radius: 9999px; }

.border { border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12)); }
.border-top { border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.12)); }
.border-bottom { border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.12)); }
.border-secondary { border-color: var(--border-color, rgba(255, 255, 255, 0.12)); }
.border-primary { border-color: var(--accent, #00E5FF) !important; }

.bg-surface-alt {
    background-color: var(--bg-surface-alt, rgba(255, 255, 255, 0.03));
}

.admin-divider {
    border: 0;
    border-top: 1px solid var(--border-color, rgba(148, 163, 184, 0.2));
}

/* ==========================================================================
   PROGRESS WIDTH UTILITIES (ZERO INLINE STYLE COMPLIANT)
   ========================================================================== */

.w-pct-0   { width: 0%; }
.w-pct-10  { width: 10%; }
.w-pct-20  { width: 20%; }
.w-pct-25  { width: 25%; }
.w-pct-30  { width: 30%; }
.w-pct-40  { width: 40%; }
.w-pct-50  { width: 50%; }
.w-pct-60  { width: 60%; }
.w-pct-65  { width: 65%; }
.w-pct-70  { width: 70%; }
.w-pct-75  { width: 75%; }
.w-pct-76  { width: 76%; }
.w-pct-80  { width: 80%; }
.w-pct-85  { width: 85%; }
.w-pct-88  { width: 88%; }
.w-pct-90  { width: 90%; }
.w-pct-95  { width: 95%; }
.w-pct-100 { width: 100%; }

/* ==========================================================================
   MODALS, ALERTS & SHARED COMPONENTS
   ========================================================================== */

.nw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 12, 20, 0.78);
    backdrop-filter: blur(8px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.nw-modal-overlay.active {
    display: flex;
}

.nw-modal-box {
    background: var(--bg-surface, #0D2433);
    color: var(--text-primary, #FFFFFF);
    border: 1px solid var(--border-glow, rgba(0, 240, 255, 0.35));
    border-radius: 18px;
    width: 100%;
    max-width: 520px;
    padding: 2rem;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
    position: relative;
}

.alert, .nw-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10B981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
}

.alert-info {
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38BDF8;
}

/* Shared Badges & Tables */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-success   { background: rgba(16, 185, 129, 0.16); color: #10B981; }
.badge-warning   { background: rgba(245, 158, 11, 0.16); color: #F59E0B; }
.badge-danger    { background: rgba(239, 68, 68, 0.16); color: #EF4444; }
.badge-info      { background: rgba(56, 189, 248, 0.16); color: #0284C7; }
.badge-primary   { background: rgba(99, 102, 241, 0.16); color: #4F46E5; }
.badge-secondary { background: rgba(148, 163, 184, 0.18); color: #64748B; }
.badge-dark      { background: #1E293B; color: #F8FAFC; }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table-thumb {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.nw-creds-pre {
    background: rgba(6, 20, 31, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    color: #38BDF8;
    font-family: monospace;
    font-size: 0.86rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    max-width: 100%;
    line-height: 1.6;
}

/* Floating Theme Preview Bar on Storefront */
.nw-theme-switcher-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.5rem;
    border-radius: 9999px;
    background: rgba(128, 128, 128, 0.12);
    border: 1px solid rgba(128, 128, 128, 0.22);
    font-size: 0.75rem;
}

.nw-theme-dot {
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.nw-theme-dot:hover, .nw-theme-dot.active {
    transform: scale(1.12);
    border-color: currentColor;
}

.nw-theme-dot-ocean { background: #071926; color: #00F0FF; }
.nw-theme-dot-editorial { background: #FAF7F2; color: #0B3B60; border-color: #CBD5E1; }
.nw-theme-dot-gradient { background: linear-gradient(135deg, #312E81, #FF6B52); color: #FFFFFF; }

.nw-brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    flex-shrink: 0;
}

.nw-preview-brand-img {
    height: 30px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.nw-currency-dropdown {
    position: relative;
    flex-shrink: 0;
}

.nw-currency-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.44rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.55);
    color: #E2E8F0;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

html[data-mode="light"] .nw-currency-trigger,
body:not(.theme-ocean-dark) .nw-currency-trigger {
    background: #F8FAFC;
    color: #0F172A;
    border-color: rgba(15, 23, 42, 0.14);
}

.nw-currency-trigger:hover {
    border-color: #22D3EE;
}

.nw-currency-caret {
    font-size: 0.65rem;
    opacity: 0.75;
}

.nw-currency-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.55rem);
    width: 310px;
    background: #0F172A;
    color: #F8FAFC;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.45);
    padding: 0.85rem;
    z-index: 1200;
    display: none;
}

html[data-mode="light"] .nw-currency-menu,
body:not(.theme-ocean-dark) .nw-currency-menu {
    background: #FFFFFF;
    color: #0F172A;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

.nw-currency-menu.is-open {
    display: block;
}

.nw-currency-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    padding-bottom: 0.55rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nw-currency-menu-head span {
    color: #94A3B8;
    font-size: 0.7rem;
}

.nw-currency-list {
    max-height: 210px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.7rem;
}

.nw-currency-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.48rem 0.65rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 0.82rem;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nw-currency-option:hover {
    background: rgba(34, 211, 238, 0.12);
}

.nw-currency-option.is-active {
    background: rgba(6, 182, 212, 0.18);
    border-color: rgba(34, 211, 238, 0.55);
}

.nw-currency-opt-main {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.nw-currency-opt-name {
    font-size: 0.74rem;
    opacity: 0.72;
}

.nw-currency-opt-symbol {
    font-weight: 700;
    color: #22D3EE;
}

html[data-mode="light"] .nw-currency-opt-symbol,
body:not(.theme-ocean-dark) .nw-currency-opt-symbol {
    color: #0284C7;
}

.nw-currency-converter-box {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding-top: 0.65rem;
}

.nw-currency-conv-title {
    font-size: 0.74rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    opacity: 0.9;
}

.nw-currency-conv-grid {
    display: grid;
    grid-template-columns: 1fr 68px 30px 68px;
    gap: 0.35rem;
    align-items: center;
}

.nw-currency-conv-input,
.nw-currency-conv-select {
    width: 100%;
    padding: 0.38rem 0.45rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.65);
    color: inherit;
    font-size: 0.76rem;
}

html[data-mode="light"] .nw-currency-conv-input,
html[data-mode="light"] .nw-currency-conv-select,
body:not(.theme-ocean-dark) .nw-currency-conv-input,
body:not(.theme-ocean-dark) .nw-currency-conv-select {
    background: #F8FAFC;
    border-color: rgba(15, 23, 42, 0.16);
}

.nw-currency-swap-btn {
    height: 30px;
    width: 30px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.nw-currency-conv-result {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #22D3EE;
}

html[data-mode="light"] .nw-currency-conv-result,
body:not(.theme-ocean-dark) .nw-currency-conv-result {
    color: #0284C7;
}

@media (max-width: 560px) {
    .nw-currency-menu {
        position: fixed;
        top: 66px;
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        max-width: none;
    }
}
