/* =========================
   PERFUMES.CSS
   Estilos EXCLUSIVOS de la página de catálogo (perfumes.html)
   Requiere que common.css esté cargado antes que este archivo.
========================= */

/* CATÁLOGO */

.catalog {
    width: 100%;
    padding: 125px 6% 60px;
    background: #1a1a1a;
    min-height: 500px;
    box-sizing: border-box;
}

.catalog h1 {
    margin: 0 0 25px;
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    color: #eee5d2;
    text-align: center;
}

/* LAYOUT GENERAL DEL CATÁLOGO */

.catalog-layout {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 180px 1fr;
    grid-template-rows: auto auto;
    column-gap: 30px;
    row-gap: 25px;
    align-items: start;
}

.catalog-pagination {
    grid-column: 2;
}

/* FILTROS */

.filters {
    width: 100%;
    grid-row: 1 / 3;
}

.filter-group {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
}

.filter-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.filter-heading span:first-child {
    font-family: Georgia, serif;
    font-size: 13px;
    color: #cfc9bd;
}

.filter-heading span:last-child {
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    color: #aaa398;
}

.filter-heading .arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}

.filter-group.collapsed .arrow {
    transform: rotate(180deg);
}

.filter-content {
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 1;
}

.filter-group.collapsed .filter-content {
    max-height: 0;
    opacity: 0;
}

.price-slider {
    position: relative;
    width: 100%;
    height: 14px;
    margin: 4px 0 6px;
}

.slider-line {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 2px;
    background: #c9ad76;
}

.slider-point {
    position: absolute;
    top: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #eee5d2;
}

.slider-point.left {
    left: 0;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-family: Montserrat, sans-serif;
    font-size: 9px;
    color: #cfc9bd;
}

.filter-group label {
    display: block;
    margin-bottom: 9px;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    line-height: 1.3;
    color: #aaa398;
    cursor: pointer;
}

.filter-group input {
    width: 10px;
    height: 10px;
    margin: 0 6px 0 0;
    padding: 0;
    vertical-align: middle;
    accent-color: #c9ad76;
    cursor: pointer;
}

/* CONTENEDOR DEL GRID DE PRODUCTOS */

.catalog-products {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

/* TARJETA DE PRODUCTO */

.catalog-product {
    width: 100%;
    padding: 10px;
    background: #111;
    border: 1px solid #5a5140;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.catalog-product:hover {
    border-color: #c9ad76;
    transform: translateY(-2px);
}

.catalog-product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
}

.catalog-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.catalog-product h3 {
    margin: 10px 2px 4px;
    font-family: Georgia, serif;
    font-size: 13px;
    font-weight: 400;
    color: #eee5d2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-product p {
    margin: 0 2px 8px;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    line-height: 1.4;
    color: #aaa398;
    min-height: 28px;
    display: -webkit-box;

    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-product strong {
    display: block;
    margin: 0 2px 9px;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #eee5d2;
}

.catalog-product button {
    width: 100%;
    padding: 8px 4px;
    border: none;
    border-radius: 4px;
    background: #eee5d2;
    color: #5f563f;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: auto;
}

.catalog-product button:hover {
    background: #c9ad76;
    color: #1a1a1a;
}

/* PAGINACIÓN */

.catalog-pagination {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.catalog-pagination a {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    color: #aaa398;
    text-decoration: none;
    transition: color 0.2s ease;
}

.catalog-pagination a:hover,
.catalog-pagination a.active {
    color: #eee5d2;
}

.catalog-pagination span {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    color: #aaa398;
}

/* RESPONSIVE — tablet */

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-row: auto;
    }

    .catalog-pagination {
        grid-column: 1;
    }

    .catalog-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .catalog-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================
   TOOLBAR / MENÚ MÓVIL DEL CATÁLOGO (sistema propio: .menu-toggle + drawer)
   Oculto por defecto en escritorio
========================= */

.catalog-toolbar {
    display: none;
}

.catalog-count {
    display: none;
}

.menu-toggle,
.cart-button {
    display: none;
}

.mobile-menu {
    display: none;
}

.mobile-nav {
    display: none;
}
.filters-overlay {
    display: none;
}

.filters-mobile-header,
.filters-mobile-footer {
    display: none;
}

@media (max-width: 768px) {

    /* NAVBAR — versión móvil de PERFUMES */

    .navbar {
        position: relative;
        height: 72px;
        padding: 0 20px;
        display: flex;
        align-items: center;
    }

    .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .logo img {
        width: 125px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu {
        display: flex;
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        color: #c9ad76;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
    }

    .cart-button {
        display: flex;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        background: none;
        border: none;
    }

    .cart-button svg {
        width: 100%;
        height: 100%;
        fill: none;
        stroke: #eee5d2;
        stroke-width: 2;
    }

    .mobile-nav {
        position: fixed;
        top: 12px;
        left: 0;
        width: 230px;
        height: calc(100vh - 24px);
        background: #111;
        display: none;
        flex-direction: column;
        padding: 100px 0 0;
        box-sizing: border-box;
        border-radius: 0 18px 18px 0;
        overflow: hidden;
        z-index: 200;
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        padding: 0 10px;
    }

    .mobile-nav a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 13px 10px;
        font-family: Montserrat, sans-serif;
        font-size: 10px;
        letter-spacing: 0.3px;
        color: #cfc9bd;
        text-decoration: none;
        background: #111;
    }

    .mobile-nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-nav-icon {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
        fill: none;
        stroke: #c9ad76;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-nav-chevron {
        width: 11px;
        height: 11px;
        flex-shrink: 0;
        fill: none;
        stroke: #77736c;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-nav a:hover {
        color: #eee5d2;
    }

    .mobile-nav a:hover .mobile-nav-icon,
    .mobile-nav a:hover .mobile-nav-chevron {
        stroke: #d8c394;
    }

    .mobile-nav-links a+a {
        border-top: 1px solid #292929;
    }

    .mobile-nav-close {
        position: absolute;
        top: 18px;
        right: 15px;
        border: none;
        background: transparent;
        color: #c9ad76;
        font-size: 20px;
        font-weight: 300;
        cursor: pointer;
    }

    .mobile-nav-logo {
        position: absolute;
        top: 25px;
        left: 20px;
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        text-decoration: none;
    }

    .mobile-nav-logo-script {
        font-family: Georgia, serif;
        font-size: 18px;
        color: #eee5d2;
    }

    .mobile-nav-logo-sub {
        font-family: Montserrat, sans-serif;
        font-size: 8px;
        letter-spacing: 1px;
        color: #c9ad76;
    }

    .mobile-nav-quote {
        margin-top: auto;
        height: 130px;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 0 16px 20px;
        box-sizing: border-box;
        background-image: linear-gradient(180deg, rgba(17, 17, 17, 0) 0%, rgba(8, 8, 8, 0.85) 55%, #080808 100%), url("assets/x.jfif");
        background-size: cover;
        background-position: center;
    }

    .mobile-nav-quote p {
        margin: 0;
        text-align: center;
        font-family: Georgia, serif;
        font-style: italic;
        font-size: 12px;
        line-height: 1.5;
        color: #eee5d2;
    }

    .mobile-nav.open {
        display: flex;
        animation: menuEntrada 0.45s ease forwards;
    }

    @keyframes menuEntrada {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }

    .mobile-nav.closing {
        animation: menuSalida 0.45s ease forwards;
    }

    @keyframes menuSalida {
        from { transform: translateX(0); }
        to { transform: translateX(-100%); }
    }

    /* CATÁLOGO — móvil */

    .catalog {
        padding: 100px 5% 40px;
    }

    .catalog h1 {
        text-align: left;
        font-size: 22px;
        margin-bottom: 16px;
    }

    .catalog-toolbar {
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
    }

    .toolbar-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 9px 14px;
        background: #111;
        border: 1px solid #444;
        border-radius: 6px;
        color: #cfc9bd;
        font-family: Montserrat, sans-serif;
        font-size: 11px;
        cursor: pointer;
    }

    .toolbar-btn svg {
        stroke: #cfc9bd;
        fill: none;
        stroke-width: 2;
    }

    .toolbar-select {
        flex: 1;
        padding: 9px 10px;
        background: #111;
        border: 1px solid #444;
        border-radius: 6px;
        color: #cfc9bd;
        font-family: Montserrat, sans-serif;
        font-size: 11px;
    }

    .catalog-count {
        display: block;
        margin: 0 0 16px;
        font-family: Montserrat, sans-serif;
        font-size: 11px;
        color: #aaa398;
    }

    .catalog-layout {
        display: block;
    }

    .catalog-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .catalog-product h3 {
        font-size: 11px;
    }

    .catalog-product strong {
        font-size: 11px;
    }

    .catalog-product button {
        font-size: 9px;
        padding: 7px 4px;
    }

    /* PANEL DE FILTROS (drawer móvil) */

    .filters {
        position: fixed;
        top: 0;
        right: 0;
        width: 82%;
        max-width: 340px;
        height: 100%;
        background: #1a1a1a;
        padding: 20px 20px 0;
        box-sizing: border-box;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }

    .filters.open {
        transform: translateX(0);
    }

    .filters-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 150;
    }

    .filters-overlay.active {
        display: block;
    }

    .filters-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 1px solid #333;
    }

    .filters-mobile-header span {
        font-family: Georgia, serif;
        font-size: 18px;
        color: #eee5d2;
    }

    .filters-mobile-header button {
        background: none;
        border: none;
        color: #cfc9bd;
        font-size: 18px;
        cursor: pointer;
    }

    .filter-group {
        font-size: 13px;
    }

    .filter-heading span:first-child {
        font-size: 15px;
    }

    .filter-group label {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .filters-mobile-footer {
        position: sticky;
        bottom: 0;
        background: #1a1a1a;
        padding: 15px 0 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        border-top: 1px solid #333;
        margin-top: 20px;
    }

    .btn-aplicar {
        padding: 12px;
        background: #eee5d2;
        color: #1a1a1a;
        border: none;
        border-radius: 6px;
        font-family: Montserrat, sans-serif;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
    }

    .btn-limpiar {
        padding: 10px;
        background: none;
        border: none;
        color: #aaa398;
        font-family: Montserrat, sans-serif;
        font-size: 11px;
        cursor: pointer;
        text-decoration: underline;
    }
}