/* ==========================================================================
   Qortoba Medical Catalog - Pixel-Perfect Styles (Matching media_1789198666507.png)
   ========================================================================== */

/* Hero Section */
.catalog-hero-wrapper {
    position: relative;
    background: radial-gradient(circle at 75% 25%, #6a213e 0%, #451225 45%, #2a0916 100%);
    color: #ffffff;
    padding-top: 130px;
    padding-bottom: 75px;
    overflow: hidden;
}

.catalog-hero-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 40px;
    align-items: center;
}

.catalog-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
}

.catalog-badge-pill .pulse-dot {
    width: 7px;
    height: 7px;
    background: #e8b4c8;
    border-radius: 50%;
    animation: catalogPulse 2s infinite;
}

@keyframes catalogPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.catalog-hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.22;
    color: #ffffff;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.catalog-hero-title .highlight {
    display: block;
    color: #f3cbd9;
}

.catalog-hero-desc {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.78);
    max-width: 580px;
    margin: 0 0 32px;
    font-weight: 300;
}

.catalog-pillars-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.catalog-pillar-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
}

.catalog-pillar-item p {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.62);
    margin: 0;
}

/* Glassmorphism Search Box */
.catalog-search-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.catalog-search-card-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

.catalog-search-input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 9999px;
    padding: 6px 8px 6px 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.catalog-search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #1e293b;
    padding: 6px 8px;
}

.catalog-search-input-wrap input::placeholder {
    color: #94a3b8;
}

.catalog-search-btn {
    background: #672340 !important;
    color: #ffffff !important;
    border: none;
    border-radius: 9999px;
    padding: 9px 24px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.catalog-search-btn:hover {
    background: #521b33 !important;
    transform: translateY(-1px);
}

.catalog-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.catalog-tag-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    padding: 4px 13px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalog-tag-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* ==========================================================================
   Catalog Body & Controls
   ========================================================================== */
.catalog-body-container {
    position: relative;
    z-index: 10;
    margin-top: -32px;
    background: #ffffff;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.05);
    padding: 36px 24px 80px;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.catalog-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 16px;
}

.catalog-header-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
}

.catalog-header-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.catalog-sort-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
}

.catalog-sort-select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.catalog-sort-select:focus {
    border-color: #672340;
}

/* Category Tabs (Horizontal Pills) */
.catalog-category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.catalog-category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab-btn {
    flex-shrink: 0;
    border-radius: 9999px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.cat-tab-btn.active {
    background: #672340 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(103, 35, 64, 0.25);
}

.cat-tab-btn.inactive {
    background: #f1f5f9;
    color: #475569;
}

.cat-tab-btn.inactive:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ==========================================================================
   2-Column Layout (Sidebar + Products Grid)
   ========================================================================== */
.catalog-main-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 10px;
}

/* Sidebar */
.catalog-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 22px;
    position: sticky;
    top: 90px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.catalog-sidebar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 18px;
}

.catalog-sidebar-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.catalog-reset-btn {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.catalog-reset-btn:hover {
    color: #672340;
}

.catalog-filter-group {
    margin-bottom: 22px;
}

.catalog-filter-group:last-child {
    margin-bottom: 0;
}

.catalog-filter-heading {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
}

.catalog-brand-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.brand-chip-btn {
    border-radius: 9999px;
    padding: 5px 13px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
}

.brand-chip-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.brand-chip-btn.active {
    background: #672340 !important;
    border-color: #672340 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(103, 35, 64, 0.2);
}

/* iOS Toggle Switches */
.catalog-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    user-select: none;
}

.catalog-toggle-label {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}

.catalog-ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.catalog-ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.catalog-ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .25s ease-in-out;
    border-radius: 24px;
}

.catalog-ios-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s ease-in-out;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.catalog-ios-switch input:checked + .catalog-ios-slider {
    background-color: #672340;
}

.catalog-ios-switch input:checked + .catalog-ios-slider:before {
    transform: translateX(20px);
}

/* Products Column */
.catalog-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.catalog-meta-results-text {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}

.catalog-count-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 9999px;
}

.catalog-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   Product Card (Exact Match to media_1789198666507.png)
   ========================================================================== */
.med-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    position: relative;
}

.med-card:hover {
    transform: translateY(-4px);
    border-color: rgba(103, 35, 64, 0.25);
    box-shadow: 0 14px 28px rgba(103, 35, 64, 0.08);
}

.med-card-img-wrap {
    position: relative;
    width: 100%;
    height: 185px;
    background: #fafafa;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.med-card-img-wrap a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.med-card-img-wrap img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.med-card:hover .med-card-img-wrap img {
    transform: scale(1.06);
}

.med-badge-sfda {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.med-badge-sfda .sfda-dot {
    width: 5px;
    height: 5px;
    background: #059669;
    border-radius: 50%;
}

.med-badge-brand {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    color: #334155;
    padding: 2px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    z-index: 2;
}

.med-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.med-card-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-bottom: 6px;
}

.med-card-stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 11px;
}

.med-card-stock.in-stock {
    color: #059669;
}

.med-card-stock.out-stock {
    color: #d97706;
}

.med-card-stock .stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.med-card-stock.in-stock .stock-dot {
    background: #10b981;
}

.med-card-stock.out-stock .stock-dot {
    background: #f59e0b;
}

.med-card-sku {
    color: #94a3b8;
    font-size: 10px;
    font-family: monospace;
}

.med-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.2s;
}

.med-card-title:hover {
    color: #672340;
}

.med-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.med-spec-pill {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.med-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.med-price-block {
    display: flex;
    flex-direction: column;
}

.med-price-label {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.med-price-value {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.med-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.med-btn-details {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.med-btn-details:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.med-btn-cart {
    background: #672340 !important;
    border: none;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.med-btn-cart:hover {
    background: #521b33 !important;
    transform: scale(1.05);
}

.med-btn-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.med-btn-cart svg {
    width: 15px;
    height: 15px;
    stroke: #ffffff;
}

/* Empty State */
.catalog-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.catalog-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: #f8fafc;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.catalog-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
}

.catalog-empty-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px;
}

/* Responsive Rules */
@media (max-width: 1100px) {
    .catalog-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 960px) {
    .catalog-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .catalog-main-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .catalog-hero-title {
        font-size: 32px;
    }
    
    .catalog-pillars-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .catalog-products-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-body-container {
        border-radius: 24px 24px 0 0;
        padding: 24px 16px 60px;
    }
}
