/*
Theme Name: Puerta Roja
Theme URI: https://renzozamora.com
Author: Renzo Zamora
Author URI: https://renzozamora.com
Description: Un tema minimalista y modular inspirado en la estética de Shopify, con herramientas SEO avanzadas integradas.
Version: 1.0.0
Text Domain: puerta-roja
*/

/* CSS Variables */
:root {
    --pr-color-primary: #000000;
    --pr-color-secondary: #008060;
    --pr-color-text: #202223;
    --pr-color-text-light: #6d7175;
    --pr-color-bg: #f4f6f8;
    --pr-color-white: #ffffff;
    --pr-color-border: #e1e3e5;
    --pr-announcement-bg: #000000;
    --pr-announcement-text: #ffffff;
    --pr-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--pr-font-family);
    color: var(--pr-color-text);
    background-color: var(--pr-color-bg);
    line-height: 1.5;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.pr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   1. Announcement Bar
   ========================================= */
.pr-announcement-bar {
    background-color: var(--pr-announcement-bg);
    color: var(--pr-announcement-text);
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

.pr-announcement-slider-wrap {
    height: 36px;
    overflow: hidden;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pr-announcement-slider {
    padding: 0;
    margin: 0;
}

.pr-announcement-slide {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pr-announcement-slide a {
    color: var(--pr-announcement-text);
    text-decoration: underline;
}

.pr-announcement-slide a:hover {
    opacity: 0.8;
}

/* =========================================
   2. Main Header
   ========================================= */
.pr-header {
    background: var(--pr-color-white);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pr-header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 80px;
}

/* Mobile Toggle */
.pr-mobile-toggle,
.pr-mobile-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--pr-color-text);
}

.pr-mobile-toggle .dashicons,
.pr-mobile-close .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Logo */
.pr-header-logo {
    justify-self: start;
}

.pr-header-logo h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--pr-color-primary);
}

.pr-header-logo img {
    width: 190px;
    max-height: 48px;
    display: block;
}

/* Navigation */
.pr-header-nav {
    justify-self: center;
}

.pr-menu {
    display: flex;
    gap: 24px;
}

.pr-menu li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--pr-color-text);
    padding: 8px 0;
    position: relative;
}

.pr-menu li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--pr-color-text);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pr-menu li a:hover:after {
    width: 100%;
}

/* Icons Grid */
.pr-header-icons {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pr-header-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s ease;
    position: relative;
}

.pr-header-icons a:hover {
    background: var(--pr-color-bg);
}

.pr-header-icons .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--pr-color-text);
}

.pr-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--pr-color-secondary);
    color: var(--pr-color-white);
    font-size: 11px;
    font-weight: 700;
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* =========================================
   3. Responsive Layout (Mobile)
   ========================================= */
@media (max-width: 768px) {
    .pr-header-grid {
        grid-template-columns: 40px 1fr auto;
        gap: 16px;
        height: 64px;
    }

    .pr-mobile-toggle {
        display: block;
        justify-self: start;
    }

    .pr-header-logo {
        justify-self: center;
    }

    .pr-header-logo img {
        max-height: 36px;
    }

    /* Off-canvas menu */
    .pr-header-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--pr-color-white);
        z-index: 1000;
        padding: 80px 24px 24px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        justify-self: auto;
    }

    .pr-header-nav.pr-nav-open {
        left: 0;
    }

    .pr-mobile-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .pr-menu {
        flex-direction: column;
        gap: 16px;
    }

    .pr-menu li a {
        font-size: 18px;
        display: block;
    }

    .pr-header-icons .pr-icon-account {
        display: none;
        /* Hide account icon on mobile to save space, usually placed in menu */
    }
}