/* =====================================================================
   LAZY CAT CULT — Main Stylesheet
   ===================================================================== */

/* Fonts are loaded in index.html for better performance */

/* --- Fonts ----------------------------------------------------------- */
@font-face {
    font-family: 'Berkshire Swash';
    src: url('fonts/BerkshireSwash-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PT Sans Narrow';
    src: url('fonts/PTSansNarrow-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PT Sans Narrow';
    src: url('fonts/PTSansNarrow-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* --- Design tokens --------------------------------------------------- */
:root {
    /* Harmonious Palette: Midnight Indigo & Warm Sand */
    --color-bg: #fcfaf8;
    /* Light, warm background */
    --color-surface: #ffffff;
    /* Bright crisp white for cards */
    --color-surface-alt: #f4efe8;
    /* Richer sand-tan for secondary blocks */
    --color-border: #dccdb8;
    /* Muted sand for subtle borders */

    --color-accent: #373163;
    /* Primary accent: Indigo matching the header */
    --color-accent-dim: #130a38;
    /* Deepest midnight indigo */
    --color-accent-glow: rgba(55, 49, 99, 0.08);
    /* Hover glow */

    --color-text: #191724;
    /* Dark, legible text */
    --color-text-muted: #6b6357;
    /* High contrast grey-sand for subtext */
    --color-link: #373163;
    --color-highlight: #c0a983;
    /* Warm tan accent */

    /* Header specific overrides */
    --color-header-bg: rgba(9, 2, 53, 0.80);
    --color-header-muted: #c0a983;
    /* Tan text on dark blue header */

    --color-shadow-tan: rgba(138, 118, 93, 0.12);

    --font-display: 'Berkshire Swash', Georgia, serif;
    --font-body: 'PT Sans Narrow', Arial Narrow, sans-serif;

    --radius: 12px;
    --radius-pill: 999px;
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.12);
    --max-width: 1200px;
}

/* --- Reset & base ---------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.65;
    min-height: 100vh;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}

a:hover {
    color: #e8c96a;
}

h1,
h2 {
    font-family: var(--font-display);
    color: var(--color-accent);
    line-height: 1.2;
}

/* Berkshire Swash has no Cyrillic — use Philosopher for RU headings */
html[lang="ru"] h1,
html[lang="ru"] h2 {
    font-family: 'Philosopher', Georgia, serif;
}

ul {
    list-style-type: "— ";
    padding-left: 1.4em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Visually hidden (for SEO h1) */
.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;
}

/* --- Header ---------------------------------------------------------- */
.header {
    background: var(--color-header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(192, 169, 131, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-start {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo-img {
    max-width: 200px;
    height: auto;
    transition: transform var(--transition);
}

.header-logo-img:hover {
    transform: scale(1.02);
}

.header-center {
    display: none;
}

@media (min-width: 768px) {
    .header-center {
        display: block;
    }
}

.tagline {
    font-family: var(--font-display);
    color: var(--color-highlight);
    font-size: 1.15rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    font-style: italic;
    opacity: 1;
    margin: 0;
}

.header-end {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.priority-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.priority-nav .nav-link {
    color: var(--color-surface);
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0.5;
    transition: color var(--transition), opacity var(--transition);
}

.priority-nav .nav-link:hover {
    color: var(--color-highlight);
    opacity: 1;
}

/* --- Language switcher ---------------------------------------------- */
.lang-switcher {
    display: flex;
    gap: 6px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(192, 169, 131, 0.3);
    color: var(--color-header-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition);
}

.lang-btn:hover {
    color: #ffffff;
    border-color: var(--color-highlight);
    background: rgba(192, 169, 131, 0.15);
}

.lang-btn.active {
    background: var(--color-highlight);
    border-color: var(--color-highlight);
    color: var(--color-accent-dim);
    box-shadow: 0 4px 12px rgba(192, 169, 131, 0.3);
}

/* --- Product nav (dropdown) ------------------------------------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: transparent;
    color: var(--color-header-muted);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    transition: color var(--transition);
}

.dropdown-btn:hover,
.dropdown:focus-within .dropdown-btn {
    color: #ffffff;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--color-surface);
    min-width: 260px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    z-index: 99;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: flex;
    flex-direction: column;
}

.dropdown-content .nav-link {
    padding: 0.6rem 1.25rem;
    color: var(--color-accent);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    text-decoration: none;
    display: block;
}

.dropdown-content .nav-link:last-child {
    border-bottom: none;
}

.dropdown-content .nav-link:hover {
    background: var(--color-accent-glow);
    color: var(--color-accent-dim);
}

/* --- Stores / links block ------------------------------------------- */
.linksblock {
    background: var(--color-surface-alt);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.linksblock a {
    font-weight: bold;
    color: var(--color-accent);
}

.linksblock a:hover {
    color: var(--color-accent-dim);
    text-decoration: underline;
}

.products-list {
    max-width: 1600px;
    width: 100%;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: grid;
    /* Fluid Grid: 1 col on mobile, as many as fit on desktop (min 450px each) */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 3rem;
    align-items: start;
}

/* Base card styling (removed duplicate media query) */
.product-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 10px 25px -5px var(--color-shadow-tan);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    height: 100%;
    /* Ensure cards in a row have same height if needed */
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px var(--color-shadow-tan);
    border-color: var(--color-accent);
}

.product-title {
    font-size: 1.75rem;
    margin-bottom: 1.1rem;
}

.theme-cyberpunk .product-title {
    font-family: 'Audiowide', sans-serif;
    font-weight: 400; /* Audiowide is naturally bold */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html[lang="ru"] .theme-cyberpunk .product-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 600; /* Solid, modern medium-bold weight */
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Clearfix for floated cover */
.product-content::after {
    content: '';
    display: table;
    clear: both;
}

/* Cover image */
.product-cover {
    float: left;
    width: 220px;
    max-width: 40%;
    margin: 0 2rem 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-cover:hover {
    transform: scale(1.04) rotate(1deg);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Description paragraphs */
.product-content p {
    margin-bottom: 0.75rem;
}

/* Features list */
.product-features {
    margin: 0.5rem 0 0.75rem 0;
}

.product-features li {
    margin-bottom: 0.25rem;
}

/* Post-features text */
.post-features-desc {
    font-weight: 500;
    color: var(--color-accent);
    margin-top: 0.75rem;
    border-left: 3px solid var(--color-highlight);
    padding-left: 1rem;
}

/* Post-features image (e.g. quicksheet preview)
   No clear:both — parent clearfix handles the float.
   Left-aligned so it stays "inside" the card, not centred across the page. */
.post-features-img {
    display: block;
    margin: 1rem 0 0;
    border-radius: 6px;
    max-width: 100%;
    border: 1px solid var(--color-border);
}

/* --- Product links (pill buttons) ------------------------------------ */
.product-links {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.1rem;
}

.links-label {
    font-weight: bold;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-right: 0.25rem;
}

.pill-btn {
    display: inline-block;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-accent-dim);
    color: var(--color-accent);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pill-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(45, 84, 94, 0.2);
}

/* --- Screenshot gallery --------------------------------------------- */
.product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.gallery-thumb {
    width: 110px;
    height: auto;
    border-radius: 5px;
    border: 1px solid var(--color-border);
    cursor: zoom-in;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    float: none;
}

.gallery-thumb:hover {
    transform: scale(1.07);
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px var(--color-shadow-tan);
}

/* --- Lightbox ------------------------------------------------------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 200ms ease;
}

.lightbox-overlay.visible {
    opacity: 1;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 6px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--color-border);
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition);
}

.lightbox-close:hover {
    color: var(--color-text);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 2.5rem;
    line-height: 1;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    user-select: none;
}

.lightbox-btn:hover {
    background: var(--color-accent);
    color: #ffffff;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* --- Footer ---------------------------------------------------------- */
.footer {
    font-family: var(--font-body);
    color: var(--color-text-muted);
    background: var(--color-surface);
    text-align: center;
    padding: 3.5rem 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--color-border);
    font-size: 1rem;
}

.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.footer-contacts a {
    color: var(--color-accent);
    font-weight: 500;
    transition: color var(--transition);
}

.footer-contacts a:hover {
    color: var(--color-highlight);
}

/* --- Mobile --------------------------------------------------------- */
@media (max-width: 600px) {
    .header {
        padding: 0.5rem 1rem;
    }

    .header-logo-img {
        max-width: 140px;
        /* appropriately scaled for mobile devices */
    }

    .header-end {
        gap: 0.65rem;
    }

    .dropdown-content {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: 3.25rem;
        width: auto;
    }

    .lang-btn {
        padding: 4px 8px;
    }

    .product-cover {
        float: none;
        width: 100%;
        max-width: 240px;
        margin: 0 auto 1rem auto;
    }

    .product-card {
        padding: 1.2rem;
    }

    .gallery-thumb {
        width: 80px;
    }

    .lightbox-btn {
        font-size: 1.8rem;
        width: 2.2rem;
        height: 2.2rem;
    }

    .lightbox-prev {
        left: 0.4rem;
    }

    .lightbox-next {
        right: 0.4rem;
    }
}