/*
Theme Name: VrPriceDrops
Theme URI: https://vrpricedrops.com/
Description: Tema ligero para VrPriceDrops: cabecera, menú, banner, pie y contenido. El catálogo lo pinta el plugin vrpricedrops-catalog.
Version: 1.3.3
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: vrpricedrops-theme
*/

/* ── Inter, self-hosted (variable font: one file per script covers 100–900).
   Served from here, not Google Fonts, which the cookie banner blocks until
   consent. License: SIL Open Font License. ── */
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url('assets/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --vrpd-bg: #28305e;
    --vrpd-header-bg: #000;
    --vrpd-footer-bg: #1c1c27;
    --vrpd-text: #fff;
    --vrpd-muted: #777;
    --vrpd-link: #5f89fc;
    --vrpd-dropdown-bg: rgba(0, 0, 0, .85);
    --vrpd-header-h: 45px;
    --vrpd-container: 1425px;
    --vrpd-gutter: 70px;
    --vrpd-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@media (max-width: 999px) {
    :root { --vrpd-gutter: 20px; --vrpd-header-h: 54px; }
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--vrpd-header-h); }
body {
    margin: 0;
    padding-top: var(--vrpd-header-h);
    background: var(--vrpd-bg);
    color: var(--vrpd-text);
    font-family: var(--vrpd-font);
    font-size: 18px;
    line-height: 24px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--vrpd-link); text-decoration: none; }
a:hover { text-decoration: underline; }
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.vrpd-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; color: #000; padding: 8px 12px; }
.vrpd-skip:focus { left: 8px; top: 8px; }
.vrpd-container { width: 100%; max-width: var(--vrpd-container); margin: 0 auto; padding: 0 var(--vrpd-gutter); }

/* ── Base typography ──────────────────────────────────────────────────────
   The plugin's own CSS leaves some of these to the theme: a 300 body
   weight, and 18px light h3s inside page rows (which is what the catalog's
   card titles inherit). Drop a rule here to let the plugin's style take
   over. */
body { font-weight: 300; }
strong, b { font-weight: 600; }
h1, h2, h3, h4, h5, h6 { color: #fff; -webkit-font-smoothing: antialiased; }
body h1 { font-size: 20px; line-height: 40px; font-weight: 500; letter-spacing: 1px; margin: 0 0 8px; }
body h2 { font-size: 50px; line-height: 60px; font-weight: 300; letter-spacing: 2px; margin: 0 0 10px; }
body h3 { font-size: 18px; line-height: 18px; font-weight: 300; margin: 0 0 10px; }
body h4 { font-size: 25px; line-height: 30px; font-weight: 300; margin: 0 0 8px; }
body h5 { font-size: 30px; line-height: 40px; font-weight: 300; margin: 0 0 8px; }
body h6 { font-size: 16px; line-height: 20px; font-weight: 300; margin: 0 0 8px; }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="number"], select, textarea {
    font-family: inherit; font-size: 14px; line-height: 24px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.vrpd-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--vrpd-header-h);
    background: var(--vrpd-header-bg);
}
body.admin-bar .vrpd-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .vrpd-header { top: 46px; } }
.vrpd-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.vrpd-logo { display: flex; align-items: center; flex-shrink: 0; }
.vrpd-logo img { display: block; width: 120px; height: auto; }

.vrpd-nav { display: flex; align-items: center; gap: 28px; height: 100%; }
.vrpd-menu, .vrpd-menu ul, .vrpd-social { list-style: none; margin: 0; padding: 0; }
.vrpd-menu { display: flex; align-items: center; gap: 4px; height: 100%; }
.vrpd-menu > li { position: relative; height: 100%; display: flex; align-items: center; }
.vrpd-menu a { color: var(--vrpd-text); font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; }
.vrpd-menu > li > a { padding: 0 12px; display: flex; align-items: center; gap: 6px; height: 100%; }
.vrpd-menu > li > a:hover, .vrpd-menu > li:focus-within > a { color: var(--vrpd-link); }
.vrpd-menu > li.menu-item-has-children > a::after {
    content: ''; width: 6px; height: 6px; margin-left: 2px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.vrpd-menu .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 230px;
    background: var(--vrpd-dropdown-bg); padding: 8px 0;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.vrpd-menu > li:hover > .sub-menu,
.vrpd-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.vrpd-menu .sub-menu a { display: block; padding: 8px 18px; }
.vrpd-menu .sub-menu a:hover { color: var(--vrpd-link); background: rgba(255, 255, 255, .04); }

.vrpd-social { display: flex; align-items: center; gap: 18px; }
.vrpd-social a { color: var(--vrpd-text); display: flex; }
.vrpd-social a:hover { color: var(--vrpd-link); }
/* Each icon: --s (row size) × its own optical factor --f, width × aspect --a (see inc/social.php). */
.vrpd-social svg { --s: 20px; height: calc(var(--s) * var(--f, 1)); width: calc(var(--s) * var(--f, 1) * var(--a, 1)); fill: currentColor; }

.vrpd-burger { display: none; }
.vrpd-menu a { white-space: nowrap; }

/* 1000–1279px (small laptops, tablets in landscape): at full spacing the
   menu didn't fit and every item wrapped onto two lines. 1.1.2. */
@media (min-width: 1000px) and (max-width: 1279px) {
    .vrpd-header .vrpd-container { padding-left: 30px; padding-right: 30px; }
    .vrpd-menu > li > a { padding: 0 8px; }
    .vrpd-nav { gap: 18px; }
}

@media (max-width: 999px) {
    .vrpd-burger {
        display: flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; padding: 0; margin-right: -8px;
        background: none; border: 0; color: var(--vrpd-text); cursor: pointer;
    }
    .vrpd-burger svg { width: 26px; height: 26px; fill: currentColor; display: block; }
    .vrpd-burger__close, .vrpd-header.is-open .vrpd-burger__open { display: none; }
    .vrpd-header.is-open .vrpd-burger__close { display: block; }
    .vrpd-nav {
        position: fixed; top: var(--vrpd-header-h); left: 0; right: 0; bottom: 0;
        flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
        height: auto; padding: 12px var(--vrpd-gutter) 32px;
        background: var(--vrpd-header-bg); overflow-y: auto;
        display: none;
    }
    body.admin-bar .vrpd-nav { top: calc(var(--vrpd-header-h) + 46px); }
    .vrpd-header.is-open .vrpd-nav { display: flex; }
    .vrpd-menu { flex-direction: column; align-items: stretch; height: auto; gap: 0; }
    .vrpd-menu > li { height: auto; flex-direction: column; align-items: stretch; border-bottom: 1px solid rgba(255, 255, 255, .08); }
    .vrpd-menu > li > a { padding: 14px 0; font-size: 16px; }
    .vrpd-menu > li.menu-item-has-children > a::after { display: none; }
    .vrpd-menu .sub-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        background: none; padding: 0 0 10px 14px; min-width: 0;
    }
    .vrpd-menu .sub-menu a { padding: 8px 0; font-size: 15px; color: rgba(255, 255, 255, .8); }
    .vrpd-social { padding-top: 20px; gap: 24px; }
    .vrpd-social svg { --s: 24px; }
    body.vrpd-nav-open { overflow: hidden; }
}

/* ── Banner (the page's featured image) ─────────────────────────────────── */
.vrpd-banner { position: relative; overflow: hidden; height: clamp(170px, 27vw, 400px); background: #000; }
.vrpd-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* ── Content ────────────────────────────────────────────────────────────── */
.vrpd-main { padding: 40px 0 60px; }
.vrpd-content > *:first-child { margin-top: 0; }
.vrpd-content p { margin: 0 0 1em; }
.vrpd-content h2, .vrpd-content h3 { line-height: 1.3; margin: 1.4em 0 .6em; }
/* Page titles written as heading blocks (H1/H2): the modest H1 look, not
 * the 50px theme H2 (1.3.1). */
.vrpd-content h1.wp-block-heading, .vrpd-content h2.wp-block-heading { font-size: 20px; line-height: 1.5; font-weight: 500; letter-spacing: 1px; margin: 0 0 8px; }
.vrpd-content ul, .vrpd-content ol { padding-left: 1.4em; }
.vrpd-row { margin: 0 0 28px; }
.vrpd-row:last-child { margin-bottom: 0; }

/* ── Core blocks used by the pages ─────────────────────────────────────────
   The block library CSS is not loaded (see functions.php), so the few
   blocks the pages use are styled here. */
.wp-block-group.vrpd-row h3 { font-size: 18px; line-height: 18px; font-weight: 300; }
.wp-block-separator { border: 0; height: 1px; background: rgba(255, 255, 255, .9); margin: 0; opacity: 1; }
.wp-block-details {
    background: rgba(0, 0, 0, .25); border-radius: 10px; margin: 0 0 10px;
}
.wp-block-details > summary {
    list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after {
    content: ''; width: 8px; height: 8px; flex-shrink: 0;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .15s;
}
.wp-block-details[open] > summary::after { transform: rotate(-135deg); }
.wp-block-details > :not(summary) { padding: 0 20px; color: #fff; }
.wp-block-details > :last-child:not(summary) { padding-bottom: 16px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.vrpd-footer { background: var(--vrpd-footer-bg); }
.vrpd-footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 60px; padding-bottom: 60px; }
.vrpd-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vrpd-footer__col a { color: var(--vrpd-text); font-size: 16px; line-height: 20px; }
.vrpd-footer__col a:hover { color: var(--vrpd-link); text-decoration: none; }
.vrpd-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .06); }
.vrpd-footer__bottom .vrpd-container {
    padding-top: 28px; padding-bottom: 28px;
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
    color: var(--vrpd-muted); font-size: 14px; line-height: 20px;
}
.vrpd-footer__social { gap: 16px; flex-wrap: wrap; }
.vrpd-footer__social svg { --s: 18px; }
.vrpd-footer__legal { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.vrpd-footer__legal a { color: var(--vrpd-muted); }
@media (max-width: 999px) {
    .vrpd-footer__cols { grid-template-columns: repeat(2, 1fr); padding-top: 40px; padding-bottom: 40px; }
}
@media (max-width: 520px) {
    .vrpd-footer__cols { grid-template-columns: 1fr; gap: 28px; }
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.vrpd-404 { text-align: center; padding: 60px 0; }
.vrpd-404 h1 { font-size: 40px; line-height: 1.2; margin: 0 0 12px; }
