/* =============================================================================
   CM Collection — main.css
   Design System: culori, tipografie, layout, utilități, animații
   Conversie fidelă din Next.js/Tailwind CSS → Vanilla CSS
   ============================================================================= */

/* ─── Google Fonts Import ──────────────────────────────────────────────────── */
/* (import-ul se face via enqueue.php, nu aici, pentru performanță) */

/* ─── CSS Variables (Design Tokens) ─────────────────────────────────────────── */
:root {
    /* Culori principale (pot fi suprascrise via Customizer inline style) */
    --primary: 196 100% 45%;             /* #00a8e8 — Cyan accent */
    --primary-hex: #00a8e8;
    --background: 233 20% 6%;            /* #0b0e14 — Dark background */
    --background-alt: 233 20% 10%;       /* #151923 */
    --foreground: 210 40% 98%;           /* #f8fafc — White text */
    --muted: 233 15% 12%;                /* Muted dark */
    --muted-foreground: 215 20% 65%;     /* #9ca3af — Gray text */
    --accent: 196 100% 35%;              /* Hover cyan */
    --border: 233 15% 25%;               /* Border subtil */
    --radius: 0.5rem;

    /* Culori concrete (derivate) */
    --color-primary: hsl(var(--primary));
    --color-bg: hsl(var(--background));
    --color-bg-alt: hsl(var(--background-alt));
    --color-fg: hsl(var(--foreground));
    --color-muted: hsl(var(--muted));
    --color-muted-fg: hsl(var(--muted-foreground));
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-strong: rgba(255, 255, 255, 0.2);

    /* Layout */
    --container-max: 1440px;
    --container-px: 1.5rem;       /* px-6 */
    --container-px-md: 3rem;      /* px-12 */
    --container-px-lg: 6rem;      /* px-24 */

    /* Tipografie */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Tranziții */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Shadows */
    --shadow-glow: 0 0 20px rgba(0, 168, 232, 0.15);
    --shadow-glow-strong: 0 0 30px rgba(0, 168, 232, 0.3);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body ::selection {
    background-color: var(--color-primary);
    color: #fff;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ─── Layout Utilities ───────────────────────────────────────────────────────── */
.cmc-main {
    flex: 1;
}

.container-cm {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-px);
    padding-right: var(--container-px);
}

@media (min-width: 768px) {
    .container-cm {
        padding-left: var(--container-px-md);
        padding-right: var(--container-px-md);
    }
}

@media (min-width: 1024px) {
    .container-cm {
        padding-left: var(--container-px-lg);
        padding-right: var(--container-px-lg);
    }
}

/* ─── Tipografie ─────────────────────────────────────────────────────────────── */
.heading-xl {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1.1;
}

.heading-lg {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    line-height: 1.15;
}

.heading-md {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.text-balance {
    text-wrap: balance;
}

.glow-text {
    text-shadow: 0 0 15px rgba(0, 168, 232, 0.5), 0 0 30px rgba(0, 168, 232, 0.3);
}

/* ─── Culori Text ────────────────────────────────────────────────────────────── */
.text-primary { color: var(--color-primary); }
.text-muted   { color: var(--color-muted-fg); }
.text-white   { color: #ffffff; }
.text-gray-400 { color: #9ca3af; }
.text-gray-300 { color: #d1d5db; }
.text-gray-500 { color: #6b7280; }

/* ─── Spacing Utilities ──────────────────────────────────────────────────────── */
.py-8  { padding-top: 2rem;  padding-bottom: 2rem; }
.py-12 { padding-top: 3rem;  padding-bottom: 3rem; }
.py-16 { padding-top: 4rem;  padding-bottom: 4rem; }
.py-20 { padding-top: 5rem;  padding-bottom: 5rem; }
.py-24 { padding-top: 6rem;  padding-bottom: 6rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

/* ─── Hero Section ───────────────────────────────────────────────────────────── */
.cmc-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    height: 50vh;
    background: #0d1117;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cmc-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: slowPan 30s ease-in-out infinite alternate;
}

.cmc-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.cmc-hero__content {
    position: relative;
    z-index: 10;
    max-width: 48rem;
    padding: 2rem;
}

.cmc-hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

.cmc-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-primary);
    font-weight: 500;
    letter-spacing: 0.05em;
}

@keyframes slowPan {
    0%   { transform: scale(1.05) translate(0, 0); }
    50%  { transform: scale(1.1) translate(-1%, -1%); }
    100% { transform: scale(1.05) translate(1%, 1%); }
}

/* ─── Marquee Animation ──────────────────────────────────────────────────────── */
@keyframes marquee {
    from { transform: translateX(0%); }
    to   { transform: translateX(-100%); }
}

.animate-marquee {
    animation: marquee 25s linear infinite;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.cmc-sidebar {
    width: 100%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

@media (min-width: 1024px) {
    .cmc-sidebar {
        width: 16rem;
        position: sticky;
        top: 8rem;
    }
}

.cmc-sidebar__title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cmc-sidebar__link {
    display: block;
    font-size: 0.875rem;
    color: var(--color-muted-fg);
    padding: 0.375rem 0;
    transition: color var(--transition-base), padding-left var(--transition-base);
}

.cmc-sidebar__link:hover,
.cmc-sidebar__link--active {
    color: var(--color-primary);
    padding-left: 0.5rem;
}

.cmc-sidebar__link--all {
    color: var(--color-fg);
    font-weight: 700;
}

/* ─── Product Grid ───────────────────────────────────────────────────────────── */
.cmc-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px)  { .cmc-product-grid { gap: 1.5rem; } }
@media (min-width: 1024px) { .cmc-product-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .cmc-product-grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .cmc-product-grid--5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px) { .cmc-product-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ─── Toolbar (Results count) ────────────────────────────────────────────────── */
.cmc-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(4px);
    font-size: 0.875rem;
    color: var(--color-muted-fg);
}

@media (min-width: 640px) {
    .cmc-toolbar { flex-direction: row; }
}

/* ─── Paginare ───────────────────────────────────────────────────────────────── */
.cmc-pagination {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.cmc-pagination__inner {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.cmc-pagination__btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all var(--transition-base);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-muted-fg);
    border: 1px solid var(--color-border);
}

.cmc-pagination__btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cmc-pagination__btn--active {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 15px rgba(0, 168, 232, 0.3);
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────────── */
.cmc-breadcrumb {
    margin-bottom: 2rem;
}

.cmc-breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--color-muted-fg);
}

.cmc-breadcrumb__item a:hover {
    color: var(--color-fg);
}

.cmc-breadcrumb__item--current {
    color: var(--color-fg);
    font-weight: 600;
}

.cmc-breadcrumb__sep {
    margin: 0 0.25rem;
    opacity: 0.4;
}

/* ─── Info Blocks (3 coloane) ────────────────────────────────────────────────── */
.cmc-info-blocks {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.cmc-info-blocks__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .cmc-info-blocks__grid { grid-template-columns: repeat(3, 1fr); }
}

.cmc-info-block {
    padding: 2rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    transition: border-color var(--transition-base);
}

.cmc-info-block:hover {
    border-color: rgba(0, 168, 232, 0.5);
}

.cmc-info-block__title {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cmc-info-block__desc {
    color: var(--color-muted-fg);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* ─── Partners Marquee Section ───────────────────────────────────────────────── */
.cmc-partners-section {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--color-bg);
}

.cmc-partners-section__label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 2.5rem;
}

.cmc-partners-marquee {
    position: relative;
    display: flex;
    overflow: hidden;
}

.cmc-partners-track {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-around;
    gap: 6rem;
    min-width: 100%;
    padding: 1rem 2rem;
    animation: marquee 25s linear infinite;
}

@media (min-width: 768px) {
    .cmc-partners-track { gap: 10rem; padding: 1.5rem 5rem; }
}

.cmc-partners-track:last-child {
    animation-delay: -12.5s;
}

.cmc-partner-item {
    flex-shrink: 0;
    height: 7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-base);
}

@media (min-width: 768px) {
    .cmc-partner-item { height: 10rem; }
}

.cmc-partner-item:hover {
    transform: scale(1.1);
}

.cmc-partner-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* ─── Catalog Layout ─────────────────────────────────────────────────────────── */
.cmc-catalog-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

@media (min-width: 1024px) {
    .cmc-catalog-layout { flex-direction: row; }
}

/* ─── Empty State ────────────────────────────────────────────────────────────── */
.cmc-empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--color-muted-fg);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

/* ─── Prose (conținut text editor) ──────────────────────────────────────────── */
.prose-dark {
    color: var(--color-muted-fg);
    font-size: 0.9375rem;
    line-height: 1.8;
}

.prose-dark h2,
.prose-dark h3,
.prose-dark h4 {
    color: var(--color-fg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.prose-dark p { margin-bottom: 1rem; }

.prose-dark ul,
.prose-dark ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose-dark ul li,
.prose-dark ol li {
    margin-bottom: 0.5rem;
}

.prose-dark strong {
    color: var(--color-fg);
    font-weight: 600;
}

.prose-dark table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.prose-dark table td,
.prose-dark table th {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    text-align: left;
}

.prose-dark table th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
    color: var(--color-fg);
}

/* ─── Specificații Tehnice ───────────────────────────────────────────────────── */
.cmc-specs {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    margin-top: 3rem;
}

.cmc-specs__title {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-fg);
    margin-bottom: 1.5rem;
}

.cmc-specs__table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cmc-specs__row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.cmc-specs__label {
    color: var(--color-muted-fg);
    font-weight: 600;
}

.cmc-specs__value {
    color: var(--color-fg);
}

.cmc-sizes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cmc-size-badge {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--color-border);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-fg);
    text-transform: uppercase;
}

/* ─── Skip to Content (Accessibility) ───────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}

/* ─── 404 Page ───────────────────────────────────────────────────────────────── */
.cmc-404 {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
}

.cmc-404__code {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    opacity: 0.3;
    display: block;
    margin-bottom: 0;
}

.cmc-404__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-fg);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.cmc-404__desc {
    color: var(--color-muted-fg);
    max-width: 32rem;
    margin: 0 auto 2rem;
}

/* ─── Search Form ────────────────────────────────────────────────────────────── */
.cmc-search-form {
    display: flex;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}

.cmc-search-form input[type="search"] {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--color-fg);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
}

.cmc-search-form input[type="search"]::placeholder {
    color: var(--color-muted-fg);
}

.cmc-search-form button[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    transition: background var(--transition-base);
}

.cmc-search-form button[type="submit"]:hover {
    background: hsl(var(--accent));
}

/* ─── Misc Utilities ─────────────────────────────────────────────────────────── */
.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;
}

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.flex     { display: flex; }
.flex-col { flex-direction: column; }
.flex-1   { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.w-full   { width: 100%; }
.gap-2    { gap: 0.5rem; }
.gap-4    { gap: 1rem; }
.gap-6    { gap: 1.5rem; }
.gap-8    { gap: 2rem; }

.divider {
    height: 1px;
    background: var(--color-border);
    margin: 3rem 0;
}
/* ------------------------------------------------------------
   UPGRADES 2026: Sticky Header, Mobile FAB, Sidebar Widgets
------------------------------------------------------------ */

/* Sticky Header */
.cmc-header--sticky {
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: slideDown 0.4s ease-out;
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Mobile FAB Filter Button */
.cmc-mobile-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 998;
    background: var(--cmc-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.cmc-mobile-fab:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.6);
}
@media (max-width: 768px) {
    .cmc-mobile-fab {
        display: flex;
    }
}

/* Sidebar Widgets Modern Styling */
.cmc-sidebar-widgets {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cmc-border);
}
.cmc-sidebar-widgets .widget {
    margin-bottom: 2rem;
}
.cmc-sidebar-widgets .widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--cmc-text);
    position: relative;
    padding-bottom: 0.5rem;
}
.cmc-sidebar-widgets .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--cmc-primary);
    border-radius: 2px;
}
.cmc-sidebar-widgets select,
.cmc-sidebar-widgets input[type="text"],
.cmc-sidebar-widgets input[type="search"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--cmc-border);
    border-radius: var(--cmc-radius);
    background: var(--cmc-surface);
    color: var(--cmc-text);
    transition: all 0.2s ease;
}
.cmc-sidebar-widgets select:focus,
.cmc-sidebar-widgets input:focus {
    outline: none;
    border-color: var(--cmc-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}
.cmc-sidebar-widgets ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cmc-sidebar-widgets ul li {
    margin-bottom: 0.75rem;
}
.cmc-sidebar-widgets ul li a {
    color: var(--cmc-text-light);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}
.cmc-sidebar-widgets ul li a::before {
    content: '\\203A';
    margin-right: 0.5rem;
    color: var(--cmc-primary);
    font-size: 1.25rem;
    line-height: 1;
}
.cmc-sidebar-widgets ul li a:hover {
    color: var(--cmc-primary);
    transform: translateX(4px);
}
