/*
 * MOTS Dark Theme - assets/css/theme.css
 * Styles for header, footer, blog list, single post, 404, etc.
 * All section content is styled by the plugin's site-builder.css
 */

/* ============================================================
   RESET & BASE
   ============================================================ */
:root {
    --mdt-bg: #0a0e27;
    --mdt-bg-2: #11163a;
    --mdt-text: #ffffff;
    --mdt-text-muted: rgba(255,255,255,0.7);
    --mdt-text-faint: rgba(255,255,255,0.5);
    --mdt-border: rgba(255,255,255,0.1);
    --mdt-primary: #7c3aed;
    --mdt-accent: #ec4899;
    --mdt-grad: linear-gradient(135deg, #7c3aed, #ec4899);

    /* Map MOTS plugin variables to theme palette so its frontend CSS
       inherits dark-mode colors automatically. */
    --mots-text:        var(--mdt-text);
    --mots-text-muted:  var(--mdt-text-muted);
    --mots-text-faint:  var(--mdt-text-faint);
    --mots-border:      var(--mdt-border);
    --mots-border-faint:rgba(255,255,255,0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--mdt-bg);
    color: var(--mdt-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body.is-dark-mode {
    background-image: radial-gradient(ellipse at top, rgba(124,58,237,0.08), transparent 60%);
}
a { color: #c4b5fd; text-decoration: none; }
a:hover { color: #ec4899; }
img { max-width: 100%; height: auto; display: block; }

.mots-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.mots-site-main { min-height: 60vh; }

/* ============================================================
   HEADER
   ============================================================ */
.mots-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10,14,39,0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--mdt-border);
    transition: padding 0.2s ease, background 0.2s ease;
}
.mots-site-header.is-scrolled {
    background: rgba(10,14,39,0.95);
    border-bottom-color: rgba(124,58,237,0.4);
}
.mots-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}
.mots-header-brand .mots-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--mdt-text);
}
.mots-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--mdt-grad);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
}
.mots-brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--mdt-text);
}
.mots-brand-logo { max-height: 40px; width: auto; }

.mots-header-nav { justify-self: center; }
.mots-primary-menu {
    display: flex;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mots-primary-menu li a {
    color: var(--mdt-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}
.mots-primary-menu li.current-menu-item a,
.mots-primary-menu li a:hover { color: var(--mdt-text); }

.mots-header-actions { display: flex; gap: 10px; align-items: center; }
.mots-header-btn-ghost,
.mots-header-btn-primary {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    display: inline-block;
    white-space: nowrap;
}
.mots-header-btn-ghost {
    background: rgba(255,255,255,0.08);
    color: var(--mdt-text);
    border: 1px solid var(--mdt-border);
}
.mots-header-btn-primary {
    background: var(--mdt-grad);
    color: #fff;
    box-shadow: 0 4px 14px rgba(236,72,153,0.25);
}
.mots-header-btn-primary:hover { color: #fff; transform: translateY(-1px); }
.mots-header-btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

.mots-mobile-toggle {
    display: none;
    background: none;
    border: 0;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    cursor: pointer;
}
.mots-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.mots-mobile-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mots-mobile-toggle.is-open span:nth-child(2) { opacity: 0; }
.mots-mobile-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
    .mots-header-inner { grid-template-columns: auto 1fr auto; }
    .mots-header-nav,
    .mots-header-actions { display: none; }
    .mots-mobile-toggle { display: flex; }
    .mots-site-header.is-mobile-open .mots-header-nav,
    .mots-site-header.is-mobile-open .mots-header-actions {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10,14,39,0.98);
        flex-direction: column;
        padding: 18px 24px;
        gap: 14px;
        align-items: stretch;
        border-bottom: 1px solid var(--mdt-border);
    }
    .mots-site-header.is-mobile-open .mots-primary-menu {
        flex-direction: column;
        gap: 14px;
    }
}

/* ============================================================
   PAGE HERO (used by archive, single post, 404)
   ============================================================ */
.mots-page-hero {
    padding: 70px 24px 50px;
    text-align: center;
    background-image:
        radial-gradient(ellipse at top, rgba(124,58,237,0.16), transparent 60%),
        linear-gradient(180deg, var(--mdt-bg), var(--mdt-bg-2));
    border-bottom: 1px solid var(--mdt-border);
}
.mots-page-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    margin: 0 0 8px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.6px;
}
.mots-page-hero p {
    color: var(--mdt-text-muted);
    margin: 6px auto 0;
    max-width: 560px;
    font-size: 15px;
}
.mots-page-hero-post .mots-blog-cat-pill {
    display: inline-block;
    background: rgba(236,72,153,0.18);
    color: #f9a8d4;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.mots-post-meta {
    margin-top: 10px;
    font-size: 13px;
    color: var(--mdt-text-faint);
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ============================================================
   BLOG LIST / GRID
   ============================================================ */
.mots-blog-list {
    padding: 50px 0;
    display: grid;
    gap: 22px;
}
.mots-blog-list.mots-blog-grid,
.mots-blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.mots-blog-item {
    background: linear-gradient(180deg, #16193b, #0f1230);
    border: 1px solid var(--mdt-border);
    border-radius: 14px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.mots-blog-item:hover { transform: translateY(-3px); border-color: rgba(124,58,237,0.4); }
.mots-blog-item.mots-blog-card { padding: 0; overflow: hidden; }
.mots-blog-item-img {
    display: block;
    overflow: hidden;
}
.mots-blog-item-img img { width: 100%; height: 180px; object-fit: cover; }
.mots-blog-item-body { padding: 18px; }
.mots-blog-item-meta {
    font-size: 11px;
    color: var(--mdt-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.mots-blog-item h2 {
    font-size: 18px;
    margin: 8px 0 8px;
    line-height: 1.3;
}
.mots-blog-item h2 a {
    color: var(--mdt-text);
    text-decoration: none;
}
.mots-blog-item h2 a:hover { color: #c4b5fd; }
.mots-blog-item p {
    color: var(--mdt-text-muted);
    font-size: 14px;
    margin: 0 0 12px;
}
.mots-link-arrow {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.mots-pagination {
    padding: 20px 0 40px;
    text-align: center;
}
.mots-pagination .nav-links { display: inline-flex; gap: 6px; }
.mots-pagination .page-numbers {
    padding: 8px 13px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--mdt-border);
    border-radius: 6px;
    color: var(--mdt-text);
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}
.mots-pagination .page-numbers.current,
.mots-pagination .page-numbers:hover {
    background: var(--mdt-grad);
    color: #fff;
    border-color: transparent;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.mots-post-body { padding: 40px 0 60px; max-width: 760px; }
.mots-post-thumb { margin-bottom: 30px; border-radius: 14px; overflow: hidden; }
.mots-prose { font-size: 16px; color: rgba(255,255,255,0.85); }
.mots-prose h2 { font-size: 26px; margin: 40px 0 16px; font-weight: 800; }
.mots-prose h3 { font-size: 21px; margin: 32px 0 12px; font-weight: 700; }
.mots-prose p  { margin: 0 0 18px; line-height: 1.75; }
.mots-prose ul, .mots-prose ol { padding-left: 22px; margin: 0 0 18px; }
.mots-prose li { margin: 4px 0; }
.mots-prose blockquote {
    border-left: 3px solid #ec4899;
    padding: 14px 22px;
    margin: 24px 0;
    background: rgba(124,58,237,0.08);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--mdt-text-muted);
}
.mots-prose code {
    background: rgba(0,0,0,0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.mots-page-body { padding: 40px 0 60px; }

/* ============================================================
   404
   ============================================================ */
.mots-404 {
    padding: 100px 24px 120px;
    text-align: center;
}
.mots-404-icon {
    font-size: 64px;
    margin-bottom: 18px;
}
.mots-404 h1 {
    font-size: 90px;
    margin: 0;
    font-weight: 800;
    background: var(--mdt-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.mots-404 h2 { font-size: 24px; margin: 8px 0 12px; }
.mots-404 p { color: var(--mdt-text-muted); margin-bottom: 24px; }
.mots-btn-primary {
    display: inline-block;
    padding: 13px 26px;
    background: var(--mdt-grad);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
}
.mots-btn-primary:hover { color: #fff; opacity: 0.9; }

/* ============================================================
   FOOTER
   ============================================================ */
.mots-site-footer {
    background: linear-gradient(180deg, var(--mdt-bg), #050719);
    border-top: 1px solid var(--mdt-border);
    margin-top: 40px;
}
.mots-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 50px 24px 24px;
}

.mots-footer-newsletter {
    background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(236,72,153,0.12));
    border: 1px solid rgba(124,58,237,0.3);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 50px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
    align-items: center;
}
.mots-footer-newsletter h3 {
    font-size: 22px;
    margin: 0 0 6px;
    font-weight: 800;
}
.mots-footer-newsletter p {
    margin: 0;
    color: var(--mdt-text-muted);
    font-size: 14px;
}
.mots-footer-newsletter-form {
    display: flex;
    gap: 8px;
}
.mots-footer-newsletter-form input {
    flex: 1;
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.mots-footer-newsletter-form input:focus { border-color: var(--mdt-accent); }
.mots-footer-newsletter-form input::placeholder { color: var(--mdt-text-faint); }
.mots-footer-newsletter-form button {
    padding: 13px 22px;
    background: var(--mdt-grad);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.mots-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--mdt-border);
}
.mots-footer-brand {
    margin-bottom: 14px;
}
.mots-footer-tagline {
    color: var(--mdt-text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 18px;
    max-width: 280px;
}
.mots-footer-socials {
    display: flex;
    gap: 8px;
}
.mots-social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--mdt-border);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.mots-social-icon:hover {
    background: var(--mdt-grad);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}
.mots-footer-col h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--mdt-text);
    margin: 0 0 14px;
    font-weight: 700;
}
.mots-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mots-footer-col li {
    margin-bottom: 8px;
    font-size: 13px;
}
.mots-footer-col li a {
    color: var(--mdt-text-muted);
    text-decoration: none;
}
.mots-footer-col li a:hover { color: var(--mdt-text); }
.mots-footer-contact li { color: var(--mdt-text-muted); }

.mots-footer-bottom {
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--mdt-text-faint);
    flex-wrap: wrap;
    gap: 12px;
}
.mots-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
}
.mots-footer-menu li a {
    color: var(--mdt-text-faint);
    font-size: 12px;
    text-decoration: none;
}
.mots-footer-menu li a:hover { color: var(--mdt-text); }

@media (max-width: 900px) {
    .mots-footer-newsletter,
    .mots-footer-grid { grid-template-columns: 1fr; }
    .mots-footer-newsletter-form { flex-direction: column; }
    .mots-footer-grid { gap: 30px; }
}

/* ============================================================
   FLASH MESSAGE (for ?mots_msg= success/error)
   ============================================================ */
.mots-flash-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    max-width: 380px;
    animation: motsFlashIn 0.3s ease;
}
.mots-flash-close {
    background: rgba(255,255,255,0.2);
    border: 0;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
@keyframes motsFlashIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   PRODUCT PAGE / CHECKOUT — Dark mode overrides for plugin CSS
   ============================================================ */
.mots-product-description,
.mots-product-description p,
.mots-product-description li,
.mots-product-description span,
.mots-product-description strong,
.mots-product-description b,
.mots-product-description em,
.mots-product-description h1,
.mots-product-description h2,
.mots-product-description h3,
.mots-product-description h4,
.mots-product-description h5,
.mots-product-description h6,
.mots-product-description div {
    color: var(--mdt-text) !important;
}
.mots-product-description a { color: #c4b5fd !important; }
.mots-product-description blockquote {
    color: var(--mdt-text-muted) !important;
    border-left: 3px solid var(--mdt-accent);
    padding-left: 14px;
    margin: 14px 0;
}
.mots-product-description code,
.mots-product-description pre {
    background: rgba(255,255,255,0.06) !important;
    color: #f5d0fe !important;
    padding: 2px 6px;
    border-radius: 4px;
}
.mots-product-description hr { border-color: var(--mdt-border); }
.mots-product-description img { max-width: 100%; height: auto; border-radius: 8px; }

/* Product listing card description (smaller text) */
.mots-product-desc { color: var(--mdt-text-muted) !important; }
.mots-product-features li { color: var(--mdt-text-muted) !important; }

/* Single product meta row, addons */
.mots-meta div { color: var(--mdt-text) !important; }
.mots-meta span { color: var(--mdt-text-faint) !important; }
.mots-meta { border-color: var(--mdt-border) !important; }
.mots-feature-list li { color: var(--mdt-text) !important; border-color: var(--mdt-border) !important; }
.mots-addons-title { color: var(--mdt-text-muted) !important; }
.mots-addon-row { border-color: var(--mdt-border) !important; }
.mots-addon-label { color: var(--mdt-text) !important; }
