/* ========================================
   CATALOG PAGE STYLES - PREMIUM MEDICAL AESTHETIC
   ======================================== */

/* Base Styles inherited from style.css */


main {
    padding-top: var(--header-height);
}

/* ========================================
   HEADER SECTION
   ======================================== */
.catalog-header {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    color: white;
}

/* Remove border from base header to merge with filter section */
.header {
    border-bottom: none;
}

.catalog-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.catalog-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.95;
    letter-spacing: 0.01em;
}

/* ========================================
   FILTER BAR - CAPSULE STYLE
   ======================================== */
.filter-section {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 1.5rem 0;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
    transition: transform 0.3s ease-in-out;
}

.filter-section.filter-section--hidden {
    transform: translateY(-100%);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

/* Desktop Dropdowns */
.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: max-content;
    min-width: 200px;
    max-width: 300px;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown-menu .status-pill {
    width: 100%;
    justify-content: flex-start;
    border: 1px solid transparent;
    /* Hide border inside dropdown for cleaner look, or keep */
}

.filter-dropdown-menu .status-pill:hover {
    background-color: #F3F4F6;
}


.filter-btn {
    appearance: none;
    background-color: transparent;
    border: 1px solid #D1D5DB;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: #9CA3AF;
    background-color: #F9FAFB;
    color: #111827;
}

.filter-btn.selected {
    background-color: #E0E7FF;
    /* Bluish gray / Indigo-50 */
    border-color: #C7D2FE;
    color: #3730A3;
    /* Indigo-800 */
}

.filter-btn:active {
    transform: translateY(0);
}

.filter-btn svg {
    transition: transform 0.2s ease;
}

.filter-btn:hover svg {
    transform: rotate(180deg);
}

.filter-btn-special {
    background-color: #DBEAFE;
    border-color: #3B82F6;
    color: #1E40AF;
}

.filter-btn-special:hover {
    background-color: #BFDBFE;
}

/* Sort Dropdown */
.sort-dropdown {
    position: relative;
}

.sort-select {
    appearance: none;
    padding: 0.625rem 2.5rem 0.625rem 1.25rem;
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23374151' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.sort-select:hover {
    background-color: #E5E7EB;
    border-color: #D1D5DB;
}

.sort-select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.products-section {
    padding: 3rem 0;
}

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

/* ========================================
   PRODUCT CARD - MEDICAL AESTHETIC
   ======================================== */
/* ========================================
   PRODUCT CARD - MEDICAL AESTHETIC
   Note: Using global .product-card styles from style.css
   ======================================== */
/* 
.product-card {
    background-color: #F9F9F9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -1px rgb(0 0 0 / 0.03);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}


.product-image-container {
    position: relative;
    background-color: #FFFFFF;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}


.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6B7280;
}

.wishlist-btn:hover {
    background-color: #FFFFFF;
    color: #EF4444;
    transform: scale(1.1);
}


.product-info {
    padding: 1.5rem;
}

.product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.star-icon {
    color: #D1D5DB;
}

.star-icon.filled {
    color: #10B981;
}

.rating-count {
    font-size: 0.75rem;
    color: #6B7280;
    margin-left: 0.25rem;
}


.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E40AF;
}

.add-to-cart-btn {
    padding: 0.625rem 1.5rem;
    background-color: #3B82F6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background-color: #2563EB;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(59 130 246 / 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}
*/

/* ========================================
   PAGINATION - CAPSULE STYLE
   ======================================== */
.pagination-section {
    padding: 3rem 0 4rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background-color: #F3F4F6;
    border-color: #D1D5DB;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background-color: #3B82F6;
    border-color: #3B82F6;
    color: white;
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-arrow {
    padding: 0 1.25rem;
}



/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .catalog-title {
        font-size: 2.5rem;
    }
}

/* Small Tablets */
@media (max-width: 768px) {
    main {
        padding-top: 0;
    }

    .filter-section {
        top: 0;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        justify-content: center;
    }

    .sort-dropdown {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .catalog-title {
        font-size: 2rem;
    }

    .catalog-subtitle {
        font-size: 1rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    .catalog-header {
        padding: 3rem 0 2rem;
    }

    .catalog-title {
        font-size: 1.75rem;
    }

    .catalog-subtitle {
        font-size: 0.9375rem;
    }

    .products-section {
        padding: 2rem 0;
    }

    .pagination {
        flex-wrap: wrap;
    }


    .pagination-arrow {
        padding: 0 1rem;
        font-size: 0.8125rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.4s ease-out;
}

/* Stagger animation for product cards */
.product-card:nth-child(1) {
    animation-delay: 0.05s;
}

.product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.product-card:nth-child(3) {
    animation-delay: 0.15s;
}

.product-card:nth-child(4) {
    animation-delay: 0.2s;
}

.product-card:nth-child(5) {
    animation-delay: 0.25s;
}

.product-card:nth-child(6) {
    animation-delay: 0.3s;
}

.product-card:nth-child(7) {
    animation-delay: 0.35s;
}


/* ========================================
   MOBILE FILTER MODAL
   ======================================== */
.mobile-filter-trigger {
    display: none;
    /* Hidden on desktop */
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.filter-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-modal.active {
    display: block;
    opacity: 1;
}

.filter-modal__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.filter-modal.active .filter-modal__content {
    transform: translateY(0);
}

.filter-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.filter-modal__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.filter-modal__reset {
    background: none;
    border: none;
    color: #EF4444;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    padding: 0;
}

.filter-modal__close {
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-modal__body {
    flex: 1;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    gap: 1rem;
}

.price-input-wrapper {
    flex: 1;
    position: relative;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 0.875rem;
}

.price-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #111827;
    outline: none;
}

.price-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Status Pills */
.status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-pill.active {
    background-color: #1F2937;
    border-color: #1F2937;
    color: #FFFFFF;
}

.status-pill:hover:not(.active) {
    background-color: #F9FAFB;
    border-color: #D1D5DB;
}

.filter-modal__footer {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Clear all takes less space */
    gap: 1rem;
    margin-top: auto;
}

.btn--block {
    width: 100%;
    justify-content: center;
}

.btn--outline {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    color: #374151;
}

.btn--outline:hover {
    background-color: #F9FAFB;
}

/* Responsive updates for Trigger */
@media (max-width: 768px) {
    .mobile-filter-trigger {
        display: flex;
    }

    .filter-buttons {
        display: none;
        /* Hide desktop pills */
    }

    .filter-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .sort-dropdown {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }
}

/* Header Filter Button Overrides */
.header-filter-btn.mobile-filter-trigger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--color-border);
    background-color: transparent;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .header-filter-btn.mobile-filter-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--color-accent);
        border-color: var(--color-accent);
        color: var(--color-white);
    }

    .header-filter-btn.mobile-filter-trigger:hover {
        background-color: var(--color-accent-hover);
        border-color: var(--color-accent-hover);
        color: var(--color-white);
    }
}
