/* assets/css/catalog.css */
:root {
    --primary: var(--color-accent-1);
    --primary-light: #e6f7f5;
    --primary-dark: #077a70;
    --secondary: #ff3e9d;
    --text-dark: var(--color-text);
    --text-medium: var(--color-text-muted);
    --text-light: #718096;
    --background: var(--color-bg-primary);
    --background-alt: var(--color-bg-secondary);
    --border: var(--color-border);
    --border-light: rgba(0, 0, 0, 0.03);
    --shadow: var(--shadow-md);
    --shadow-hover: var(--shadow-lg);
    --radius: var(--radius-md);
    --transition: var(--transition);
}

/* Base Layout */
.catalog-page {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    padding: 20px 0;
    line-height: 1.6;
}

.catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Header Section */
.catalog-header {
    text-align: center;
    margin-bottom: 40px;
}

.catalog-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.catalog-subtitle {
    font-size: 17px;
    color: var(--text-medium);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 500;
}

/* Layout Grid (Sidebar + Products) */
.catalog-layout {
    display: flex;
    gap: 30px;
    position: relative;
    align-items: flex-start;
    /* Critical for sticky sidebar */
}

/* Sidebar Filters */
.catalog-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    /* Hidden by default, toggled by button */
    animation: fadeIn 0.3s ease;
}

.sidebar-header-mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.sidebar-title-mobile {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: var(--text-dark);
}

.btn-close-sidebar {
    background: var(--background-alt);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.2s;
}

.btn-close-sidebar:active {
    transform: scale(0.9);
    background: var(--primary-light);
    color: var(--primary);
}

.catalog-sidebar.active {
    display: block;
}

/* Unified Filter Button (Desktop & Mobile) */
.btn-filter-toggle {
    display: inline-flex;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
    box-shadow: var(--shadow);
}

/* Primary Routine Buttons (Biblioteca, Mi Rutina) */
.btn-routine-primary {
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border-width: 2px;
}

.btn-filter-toggle:hover {
    background: var(--background-alt);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-filter-toggle.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}

/* Premium Tooltips using data-tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.9) transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}



.btn-filter-toggle.filters-active {
    background: #e6f7f5;
    /* Light teal background */
    border-color: var(--primary);
    color: var(--primary-dark);
}

.btn-filter-toggle.filters-active::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 14px;
    height: 14px;
    background: #ff3e9d;
    /* Vibrant pink */
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(255, 62, 157, 0.4);
    animation: pulse-notification 2s infinite;
    z-index: 10;
}

@keyframes pulse-notification {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 62, 157, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 62, 157, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 62, 157, 0);
    }
}

/* Onboarding Tooltip */
.filter-tooltip {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--secondary);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(255, 62, 157, 0.3);
    pointer-events: none;
    /* Don't block clicks */
    animation: bounce 2s infinite;
    z-index: 100;
}

.filter-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--secondary);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}



.filter-section {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 16px;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sort-select-sidebar {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px !important;
    transition: var(--transition);
}

.sort-select-sidebar:hover {
    border-color: var(--primary) !important;
}

.sort-select-sidebar:focus {
    border-color: var(--primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-medium);
    cursor: pointer;
    transition: color 0.2s;
}

.filter-checkbox:hover {
    color: var(--primary);
}

.filter-checkbox input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Main Content Area */
.catalog-content {
    flex-grow: 1;
}

/* Controls (Search, Sort, Mobile Filter Trigger) */
.catalog-controls {
    background: white;
    padding: 15px 24px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: var(--header-height, 80px);
    z-index: 990;
    border: 1px solid var(--border-light);
}

/* On mobile, adjust sticky position if needed */
@media (max-width: 768px) {
    .catalog-controls {
        top: var(--header-height-mobile, 70px);
        padding: 12px 16px;
        border-radius: 0;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        z-index: 980;
        /* Below header z-index 1000 */
        box-sizing: border-box;
    }
}

.btn-filter-mobile {
    display: none;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-filter-mobile:hover {
    background: var(--background-alt);
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 1024px) {
    .btn-filter-mobile {
        display: flex;
    }
}

.search-box {
    flex-grow: 1;
    max-width: 400px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Active Filters (Chips) */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-chip {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: #d0f0eb;
    transform: translateY(-1px);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* Adaptive logic: when only ONE product exists, let it take more space and center it */
.products-grid .product-card:only-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Enhanced Product Card */
.product-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary);
}

.product-image-wrapper {
    position: relative;
    height: 240px;
    background: #f8fafc;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Badges */
.badge-discount {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff3e9d;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    z-index: 12;
    /* Above everything */
    box-shadow: 0 4px 6px rgba(255, 62, 157, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

/* Attribute Tags (Overlay on Image or below) */
.card-tags {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Show tags on hover, or always show on mobile? 
   Neuromarketing: Always showing key attributes is better for scanning. 
   Let's move them below the image content for cleaner look, 
   OR overlay them. Overlay is modern. */

.card-tags {
    opacity: 1;
    /* Always visible for better UX */
    transform: translateY(0);
}

.tag-pill {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-medium);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-pill:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.tag-ingredient {
    color: #0b9a8d;
    border-color: #0b9a8d33;
}

.tag-skin-type {
    color: #8e44ad;
    border-color: #8e44ad33;
}

.tag-skin-need {
    color: #e91e63;
    border-color: #e91e6333;
}

/* Content */
.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price & CTA */
.product-footer {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-current {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
}

.price-old {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.btn-add {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(11, 154, 141, 0.25);
}

/* Modals (Purchase) */
/* Modals (Purchase & Redirect) */
.redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 12000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.purchase-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 480px;
    border-radius: 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Info Toggle Button */
.btn-toggle-details {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 8px;
    margin-top: 10px;
    margin-bottom: 5px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-details:hover {
    background: var(--background-alt);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-toggle-details svg {
    margin-right: 5px;
}

/* Toggle States */
.product-card .text-hide {
    display: none;
}

.product-card.expanded .text-show {
    display: none;
}

.product-card.expanded .text-hide {
    display: inline-flex;
    align-items: center;
}

/* Expandable Details Section */
.product-details-expandable {
    display: none;
    background: var(--background-alt);
    margin: 5px -20px 0;
    /* Negate padding */
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    animation: slideDown 0.3s ease;
}

.product-card.expanded .product-details-expandable {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.details-block {
    margin-bottom: 12px;
}

.details-block:last-child {
    margin-bottom: 0;
}

.details-block h4 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.details-list li {
    margin-bottom: 4px;
}

/* Video Thumbnail */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    margin-top: 5px;
}

.video-thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.video-thumbnail-container:hover img {
    opacity: 1;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.video-thumbnail-container:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: red;
}

.link-video {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .catalog-layout {
        flex-direction: column;
    }

    .catalog-sidebar {
        display: none;
        /* Needs JS to toggle */
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 2000;
        overflow-y: auto;
        padding-top: 20px;
    }

    .sidebar-header-mobile {
        display: flex;
    }

    .catalog-sidebar.active {
        display: block;
    }

    .catalog-container {
        padding: 20px 15px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .product-title {
        font-size: 14px;
    }

    .btn-add {
        font-size: 14px;
        padding: 10px;
    }

    .card-tags {
        display: none;
        /* Hide tags on mobile grid to save space, show in detail? Or show only 1? */
        /* Let's keep them hidden on very small screens or limit to 1 */
    }
}

/* --- Distributed Product Badges (Corner Layout) --- */

/* --- Clean Aesthetic: Premium Corner Ribbons --- */

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    /* Important for clipping ribbons */
    border-radius: 12px 12px 0 0;
    /* Match card radius if needed */
}

.card-badge-pos {
    position: absolute;
    z-index: 8;
    pointer-events: none;
    /* Container passes clicks */
}

/* Position: Top Right (Usage Moment) */
.card-badge-pos.top-right {
    top: 0;
    right: 0;
    width: 60px;
    /* Size of the hit area */
    height: 60px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

/* Corner Ribbon Container */
.corner-ribbon a {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.8));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom-left-radius: 20px;
    /* The "Curved Triangle" feel */
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 10;
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    text-decoration: none;
    color: #4b5563;
    /* Gray-600 */
    overflow: hidden;
}

/* Hover Effect for Ribbon */
.corner-ribbon a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: -1;
    border-bottom-left-radius: 20px;
}

/* Icon Styling inside Ribbon */
.corner-ribbon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    transition: transform 0.3s ease;
}

/* Hover State */
.corner-ribbon a:hover {
    width: 50px;
    /* Slight expand */
    height: 50px;
    border-bottom-left-radius: 24px;
    box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.1);
    color: #10b981;
    /* Emerald highlight */
}

.corner-ribbon a:hover svg {
    transform: scale(1.1) rotate(5deg);
}


/* Position: Top Left (Skin Type - Minimal Dot) */
.card-badge-pos.top-left {
    top: 10px;
    left: 10px;
}

.minimal-dot a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #8e44ad;
    /* Purple for skin type */
    transition: all 0.2s ease;
    pointer-events: auto;
}

.minimal-dot a:hover {
    transform: scale(1.15);
    background: #fff;
    color: #6c3483;
}

/* Position: Bottom Left (Skin Needs - Pill style) */
.card-badge-pos.bottom-left {
    bottom: 10px;
    left: 10px;
}

.needs-pill a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #e91e63;
    /* Pink color for needs */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    border: 1px solid rgba(233, 30, 99, 0.1);
}

.needs-pill a:hover {
    background: #e91e63;
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(233, 30, 99, 0.2);
}

.needs-pill svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.minimal-dot svg {
    width: 14px;
    height: 14px;
    margin: 0;
}

/* Hide text in these aesthetic badges (only icon visible) */
.corner-ribbon a,
.minimal-dot a {
    font-size: 0;
    /* Hide text */
}

.corner-ribbon a svg,
.minimal-dot a svg {
    display: block;
    /* Show SVG */
}

/* Inline Discount Badge (Next to Price) */
.badge-discount-inline {
    background-color: #ef4444;
    /* Red-500 */
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Detail Links in Expanded View */
.detail-link {
    color: #0d9488;
    /* Teal-600 */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px dotted #0d9488;
}

.detail-link:hover {
    color: #0f766e;
    /* Teal-700 */
    background: rgba(13, 148, 136, 0.1);
    border-bottom-style: solid;
}

/* --- UX Improvements --- */

/* 1. Sticky Sidebar (Desktop) */
@media (min-width: 769px) {
    .catalog-sidebar.active {
        position: sticky;
        top: 90px;
        /* Positioned below the sticky controls bar */
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        /* Scrollbar styling for webkit */
        scrollbar-width: thin;
        scrollbar-color: var(--primary) transparent;
    }
}

/* 2. Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f1f5f9;
    height: 480px;
    /* Approx height of real card */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f8fafc 4%, #f1f5f9 25%, #f8fafc 36%);
    background-size: 1000px 100%;
}

.skeleton-img {
    width: 100%;
    height: 280px;
    border-radius: 8px;
}

.skeleton-line {
    height: 20px;
    border-radius: 4px;
    width: 100%;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.price {
    width: 40%;
    height: 32px;
    margin-top: auto;
}

/* Exceptional Badge (Expert Approved) */
.badge-exceptional {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    pointer-events: none;
    width: 65px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .badge-exceptional {
    transform: scale(1.15) rotate(8deg);
}

.badge-exceptional img {
    width: 100%;
    height: auto;
    display: block;
}

/* Taxonomy Hub (Enhanced SEO) */
.hub-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.hub-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 10px;
    text-align: center;
}

.hub-subtitle {
    font-size: 16px;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
}

.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.taxonomy-card {
    background: var(--background-alt);
    border-radius: var(--radius);
    padding: 30px 24px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: 100%;
}

.taxonomy-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary);
}

.taxonomy-card .tax-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 24px;
}

.tax-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
}

.tax-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Specific Card variants */
.card-ingredient .tax-icon {
    background: #e0f2f1;
    color: #0b9a8d;
}

.card-skin-type .tax-icon {
    background: #f3e5f5;
    color: #8e44ad;
}

.card-skin-need .tax-icon {
    background: #fce4ec;
    color: #e91e63;
}

.card-usage .tax-icon {
    background: #fff3e0;
    color: #ff9800;
}

/* Discovery Banner in Catalog */
.discovery-banner {
    background: linear-gradient(135deg, #e6f7f5 0%, #f8fafc 100%);
    border: 1px solid #0b9a8d33;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.discovery-banner-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.discovery-banner-title {
    font-size: 22px;
    font-weight: 800;
    color: #0b9a8d;
    margin-bottom: 8px;
}

.discovery-banner-text {
    color: #4a5568;
    font-size: 15px;
    margin: 0;
}

.btn-discovery-banner {
    background: #0b9a8d;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(11, 154, 141, 0.2);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-discovery-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(11, 154, 141, 0.3);
    color: white;
}

.discovery-banner-decoration {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 120px;
    opacity: 0.03;
    font-weight: 900;
    color: #0b9a8d;
    pointer-events: none;
}

@media (max-width: 768px) {
    .discovery-banner {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 24px;
        gap: 20px;
    }

    .btn-discovery-banner {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .discovery-banner-title {
        font-size: 20px;
    }

    /* Exceptional badge repositioned top-right on mobile */
    .badge-exceptional {
        width: 50px;
        top: 8px;
        right: 8px;
        bottom: auto;
        /* Reset previous bottom positioning */
    }
}