/**
 * UPFIT INDUSTRIES — Phase 2 Catalog Styles
 */

.product-sku {
    display: block;
    font-size: 0.72rem;
    color: var(--uf-grey);
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

.product-card--list {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
}

.product-card--list .product-media {
    aspect-ratio: 1;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.product-card--list .product-body {
    justify-content: center;
    padding: 1.5rem 1.75rem;
}

.product-list-desc {
    color: var(--uf-grey);
    font-size: 0.92rem;
    margin: 0.5rem 0 0.85rem;
    max-width: 520px;
}

.product-list-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.product-grid--list {
    grid-template-columns: 1fr !important;
    gap: 1rem;
}

.product-grid--recent {
    grid-template-columns: repeat(4, 1fr);
}

/* Shop layout */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.shop-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    max-height: calc(100vh - var(--header-h) - 2rem);
    overflow-y: auto;
    padding: 1.35rem;
    border-radius: var(--radius-lg);
    background: var(--uf-white);
    border: 1px solid rgba(122, 15, 29, 0.08);
    box-shadow: var(--shadow-sm);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.sidebar-head h3 {
    font-size: 1.1rem;
}

.filter-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid rgba(122, 15, 29, 0.06);
}

.filter-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--uf-navy);
    margin-bottom: 0.75rem;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--uf-accent);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
}

.filter-search:focus-within {
    border-color: rgba(122, 15, 29, 0.35);
    box-shadow: 0 0 0 4px rgba(122, 15, 29, 0.1);
}

.filter-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.filter-cats {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.filter-cats a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--uf-text-soft);
}

.filter-cats a span {
    font-size: 0.72rem;
    color: var(--uf-grey);
    background: var(--uf-accent);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.filter-cats a.is-active,
.filter-cats a:hover {
    background: var(--uf-blue-soft);
    color: var(--uf-blue);
}

.filter-subs {
    margin: 0.25rem 0 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.filter-subs a {
    font-size: 0.82rem;
    font-weight: 500;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-row input {
    width: 100%;
    border: 1px solid rgba(122, 15, 29, 0.12);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    font-family: inherit;
    background: var(--uf-accent);
    outline: none;
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chip {
    position: relative;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(122, 15, 29, 0.12);
    background: var(--uf-white);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--uf-navy);
    cursor: pointer;
    transition: var(--transition-fast);
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip.is-active,
.chip:hover {
    background: var(--uf-navy);
    border-color: var(--uf-navy);
    color: #fff;
}

.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-swatch {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.color-swatch input {
    position: absolute;
    opacity: 0;
}

.color-swatch span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.color-swatch.is-active {
    border-color: var(--uf-blue);
    transform: scale(1.08);
}

.color-grid--lg .color-swatch {
    width: 38px;
    height: 38px;
}

.clear-link,
.clear-all-link {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--uf-blue);
}

.clear-all-link {
    display: block;
    text-align: center;
    margin-top: 0.85rem;
}

.shop-toolbar--premium {
    position: sticky;
    top: var(--header-h);
    z-index: 20;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    background: rgba(245, 245, 245, 0.92);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: var(--uf-navy);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.sort-pills {
    gap: 0.35rem;
}

.sort-pills a {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--uf-text-soft);
}

.sort-pills a.is-active,
.sort-pills a:hover {
    background: var(--uf-navy);
    color: #fff;
}

.sort-select-wrap select {
    border: 1px solid rgba(122, 15, 29, 0.12);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    background: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--uf-navy);
}

.view-toggle {
    display: inline-flex;
    border: 1px solid rgba(122, 15, 29, 0.12);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.view-toggle a {
    width: 40px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--uf-grey);
}

.view-toggle a.is-active {
    background: var(--uf-navy);
    color: #fff;
}

.shop-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--uf-accent);
    border-radius: var(--radius-lg);
}

.shop-empty i {
    font-size: 2.5rem;
    color: var(--uf-blue);
}

.shop-empty h3 {
    margin: 1rem 0 0.5rem;
}

.shop-empty p {
    color: var(--uf-grey);
    margin-bottom: 1.25rem;
}

.shop-pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: var(--uf-accent);
    color: var(--uf-navy);
    transition: var(--transition-fast);
}

.page-btn.is-active,
.page-btn:hover {
    background: var(--uf-gradient-btn);
    color: #fff;
}

.page-gap {
    padding: 0.5rem;
    color: var(--uf-grey);
}

.recent-block {
    margin-top: 3.5rem;
}

.recent-block h3 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(27, 27, 27, 0.45);
    z-index: 1050;
}

/* Category hero — premium gradient (no background images) */
.cat-hero,
.cat-hero--gradient {
    position: relative;
    min-height: clamp(220px, 32vw, 320px);
    display: flex;
    align-items: flex-end;
    padding: clamp(3.5rem, 7vw, 5rem) 0 clamp(2.25rem, 4vw, 3.25rem);
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, rgba(122, 15, 29, 0.10), transparent 55%),
        radial-gradient(ellipse 55% 60% at 100% 100%, rgba(122, 15, 29, 0.07), transparent 50%),
        linear-gradient(145deg, #ffffff 0%, #f7f7f7 42%, #f4ebee 78%, #efe3e6 100%);
    border-bottom: 1px solid rgba(122, 15, 29, 0.08);
}

.cat-hero-bg,
.cat-hero-overlay {
    display: none !important;
}

.cat-hero-content {
    position: relative;
    z-index: 2;
    color: var(--uf-text-soft, #3A3F4B);
    max-width: 720px;
}

.cat-hero-content .breadcrumb,
.cat-hero-content .breadcrumb a {
    color: rgba(27, 27, 27, 0.55);
}

.cat-hero-content .breadcrumb a:hover {
    color: var(--uf-primary, #7A0F1D);
}

.cat-hero-content .breadcrumb span {
    color: rgba(27, 27, 27, 0.35);
}

.cat-hero-content h1 {
    color: var(--uf-text, #1B1B1B);
    font-size: clamp(2.1rem, 4.5vw, 3.25rem);
    margin: 0.5rem 0 1rem;
}

.cat-hero-content p {
    color: rgba(27, 27, 27, 0.62);
    margin-bottom: 1.5rem;
    max-width: 540px;
}

.cat-hero-content .btn-outline {
    border-color: rgba(122, 15, 29, 0.28);
    color: var(--uf-primary, #7A0F1D);
}

.cat-hero-content .btn-outline:hover {
    background: rgba(122, 15, 29, 0.06);
}

@media (max-width: 575.98px) {
    .cat-hero,
    .cat-hero--gradient {
        min-height: 200px;
        padding-top: 3rem;
        padding-bottom: 2rem;
        align-items: flex-end;
    }
    .cat-hero-content .hero-ctas {
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem;
    }
}

.subcat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.subcat-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid rgba(122, 15, 29, 0.06);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.subcat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.subcat-card__text {
    min-width: 0;
}

.subcat-card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.subcat-card span {
    font-size: 0.78rem;
    color: var(--uf-grey);
}

.subcat-card i {
    color: var(--uf-blue);
    flex-shrink: 0;
}

/* PDP */
.page-hero--slim {
    padding: calc(var(--header-h) + 2.5rem) 0 1.25rem;
}

.pdp-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.pdp-zoom {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--uf-accent);
    aspect-ratio: 1;
    cursor: zoom-in;
}

.pdp-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s var(--ease);
}

.pdp-zoom:hover .pdp-main-img {
    transform: scale(1.12);
}

.pdp-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.pdp-thumb {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    aspect-ratio: 1;
    padding: 0;
}

.pdp-thumb.is-active,
.pdp-thumb:hover {
    border-color: var(--uf-blue);
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-title {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    margin: 0.35rem 0 0.75rem;
}

.pdp-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.pdp-short {
    color: var(--uf-grey);
    margin: 0.5rem 0 1.25rem;
}

.pdp-option {
    margin-bottom: 1.25rem;
}

.option-value {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--uf-grey);
}

.pdp-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.35rem;
}

.pdp-flags span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--uf-blue-soft);
    color: var(--uf-navy);
    font-size: 0.75rem;
    font-weight: 700;
}

.pdp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.9rem 1.35rem;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--uf-burgundy-bright) 0%, var(--uf-burgundy) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    background: linear-gradient(145deg, var(--uf-burgundy) 0%, var(--uf-burgundy-deep) 100%);
    color: #fff;
    box-shadow: 0 10px 28px rgba(107, 15, 26, 0.35);
}

.pdp-quick-specs {
    display: grid;
    gap: 0.45rem;
    color: var(--uf-text-soft);
    font-size: 0.92rem;
}

.pdp-tabs {
    margin-top: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(122, 15, 29, 0.08);
    overflow: hidden;
    background: #fff;
}

.pdp-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--uf-accent);
    border-bottom: 1px solid rgba(122, 15, 29, 0.06);
}

.pdp-tab {
    padding: 1rem 1.35rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--uf-grey);
    border-bottom: 2px solid transparent;
}

.pdp-tab.is-active {
    color: var(--uf-navy);
    border-bottom-color: var(--uf-blue);
    background: #fff;
}

.pdp-tabpanel {
    padding: 1.5rem 1.5rem 1.75rem;
    color: var(--uf-text-soft);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table th,
.spec-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(122, 15, 29, 0.06);
    text-align: left;
    vertical-align: top;
}

.spec-table th {
    width: 38%;
    color: var(--uf-navy);
    font-weight: 700;
}

.pdp-lower-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.pdp-custom-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--uf-gradient-navy);
    color: rgba(255, 255, 255, 0.85);
}

.pdp-custom-card h3 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.pdp-custom-card ul {
    margin: 1.25rem 0 1.5rem;
    display: grid;
    gap: 0.45rem;
}

.form-alert {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-alert--ok { background: #F7E9EB; color: #7A0F1D; }
.form-alert--err { background: #FDECEC; color: #9B1C1C; }

.pdp-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(122, 15, 29, 0.08);
    box-shadow: 0 -10px 40px rgba(122, 15, 29, 0.08);
    padding: 0.75rem 0;
    transform: translateY(110%);
    transition: transform 0.35s var(--ease);
}

.pdp-sticky.is-visible {
    transform: translateY(0);
}

.pdp-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pdp-sticky-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.pdp-sticky-info img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.pdp-sticky-info strong {
    display: block;
    font-size: 0.92rem;
    color: var(--uf-navy);
}

.pdp-sticky-info span {
    font-size: 0.78rem;
    color: var(--uf-grey);
}

.pdp-sticky-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Mega menu expanded */
.mega-menu--catalog {
    width: min(1040px, calc(100vw - 1.5rem));
    max-height: min(72vh, 560px);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1200;
}

.mega-grid--catalog {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mega-col a.mega-parent {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--uf-navy) !important;
    padding-bottom: 0.55rem;
}

/* Search overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(27, 27, 27, 0.55);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 1.25rem 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-panel {
    width: min(720px, 100%);
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(16px);
    transition: transform 0.4s var(--ease);
}

.search-overlay.is-open .search-panel {
    transform: translateY(0);
}

.search-panel-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(122, 15, 29, 0.06);
}

.search-panel-head i {
    color: var(--uf-blue);
}

.search-panel-head input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-family: inherit;
}

.search-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--uf-accent);
    display: grid;
    place-items: center;
}

.search-results {
    max-height: 420px;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-result {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 12px;
    transition: var(--transition-fast);
}

.search-result:hover {
    background: var(--uf-accent);
}

.search-result img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

.search-result strong {
    display: block;
    color: var(--uf-navy);
    font-size: 0.95rem;
}

.search-result span {
    font-size: 0.78rem;
    color: var(--uf-grey);
}

.search-empty {
    padding: 2rem;
    text-align: center;
    color: var(--uf-grey);
}

/* Quick view modal */
.qv-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(27, 27, 27, 0.55);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.qv-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.qv-panel {
    width: min(920px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.qv-media img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.qv-body {
    padding: 1.75rem;
}

.qv-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}

.compare-bar {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%) translateY(120%);
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--uf-navy);
    color: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform 0.35s var(--ease);
}

.compare-bar.is-visible {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 1199.98px) {
    .subcat-grid { grid-template-columns: repeat(2, 1fr); }
    .mega-grid--catalog { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991.98px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(360px, 90vw);
        max-height: none;
        z-index: 1100;
        border-radius: 0;
        transform: translateX(-105%);
        transition: transform 0.4s var(--ease);
    }
    .shop-sidebar.is-open { transform: translateX(0); }
    .pdp-grid,
    .pdp-lower-grid,
    .qv-panel { grid-template-columns: 1fr; }
    .product-grid--recent { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
    .product-card--list { grid-template-columns: 1fr; }
    .product-card--list .product-media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .subcat-grid { grid-template-columns: 1fr; }
    .pdp-sticky-info strong { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
