/**
 * Category Page Styles - MPP Jewellers
 * Professional Redesign with Premium Look
 */

/* Category Banner */
.category-banner {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-banner-default {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
}

.category-banner-title {
    position: relative;
    z-index: 1;
    font-family: 'Cinzel', serif;
    font-size: 48px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    letter-spacing: 3px;
}

.category-banner-subtitle {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    text-align: center;
    max-width: 650px;
    margin: 10px auto 0;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

/* Quick Actions Bar */
.quick-actions-bar {
    background: linear-gradient(90deg, #0d6334 0%, #0a4d28 50%, #c41e3a 100%);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quick-actions-bar .container {
    display: flex;
    justify-content: center;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    padding: 16px 45px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border-right: 1px solid rgba(255,255,255,0.15);
    position: relative;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #d4a853;
    transition: width 0.3s;
}

.quick-action-btn:hover::before {
    width: 80%;
}

.quick-action-btn:last-child {
    border-right: none;
}

.quick-action-btn:hover {
    background: rgba(255,255,255,0.1);
}

.quick-action-btn svg {
    fill: currentColor;
    opacity: 0.9;
}

/* Category Section Layout */
.category-section {
    padding: 50px 0 70px;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
}

/* ========================================
   FILTER SIDEBAR - Premium Design
   ======================================== */
.filter-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4a853;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #d4a853;
    border-radius: 50%;
}

.filter-group {
    margin-bottom: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.filter-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0;
    color: #d4a853;
    padding: 18px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group-title::before {
    content: '◆';
    font-size: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    padding: 14px 20px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    margin: 0;
}

.filter-checkbox:hover {
    background: linear-gradient(90deg, #f8f6f0 0%, #fff 100%);
    border-left-color: #d4a853;
    color: #1a1a1a;
}

.filter-checkbox input {
    display: none;
}

.filter-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 14px;
    position: relative;
    transition: all 0.25s;
    flex-shrink: 0;
    background: #fff;
}

.filter-checkbox:hover .checkmark {
    border-color: #d4a853;
}

.filter-checkbox input:checked + .checkmark {
    background: linear-gradient(135deg, #d4a853 0%, #c49a47 100%);
    border-color: #d4a853;
    box-shadow: 0 2px 8px rgba(212,168,83,0.3);
}

.filter-checkbox input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.filter-checkbox .filter-label {
    flex: 1;
    font-weight: 500;
}

.filter-checkbox .count {
    margin-left: auto;
    color: #999;
    font-size: 12px;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ===== Category Radio Buttons ===== */
.filter-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    padding: 14px 20px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    margin: 0;
}

.filter-radio:hover {
    background: linear-gradient(90deg, #f8f6f0 0%, #fff 100%);
    border-left-color: #d4a853;
    color: #1a1a1a;
}

.filter-radio input {
    display: none;
}

.radiomark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 14px;
    position: relative;
    transition: all 0.25s;
    flex-shrink: 0;
    background: #fff;
}

.filter-radio:hover .radiomark {
    border-color: #d4a853;
}

.filter-radio input:checked + .radiomark {
    border-color: #d4a853;
    background: #fff;
    box-shadow: 0 2px 8px rgba(212,168,83,0.3);
}

.filter-radio input:checked + .radiomark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a853 0%, #c49a47 100%);
}

.filter-radio .filter-label {
    flex: 1;
    font-weight: 500;
}

.clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #c41e3a;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 20px;
    padding: 10px 16px;
    border: 1px solid #c41e3a;
    border-radius: 6px;
    transition: all 0.3s;
}

.clear-filters:hover {
    background: #c41e3a;
    color: #fff;
}

.clear-filters::before {
    content: '✕';
    font-size: 10px;
}

/* ========================================
   PRODUCTS AREA
   ======================================== */
.products-area {
    min-height: 500px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #eee;
}

.results-count {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.results-count strong {
    color: #1a1a1a;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-dropdown label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.sort-dropdown select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s;
}

.sort-dropdown select:hover {
    border-color: #d4a853;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: #d4a853;
    box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}

/* ========================================
   PRODUCTS GRID - Centered Layout
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    justify-content: center;
}

/* Center products when fewer than full row */
.products-grid {
    justify-items: center;
}

.product-card {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.product-card:hover::before {
    border-color: #d4a853;
}

.product-card .product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-card .product-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: auto;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    background: #1a1a1a;
    color: #fff;
    z-index: 2;
}

.product-badge.new {
    background: linear-gradient(135deg, #0d6334 0%, #0a4d28 100%);
}

.product-badge.trending {
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
}

.product-badge.bestseller {
    background: linear-gradient(135deg, #d4a853 0%, #c49a47 100%);
    color: #1a1a1a;
}

.product-card .product-info {
    padding: 22px 20px 25px;
    text-align: center;
    background: #fff;
}

.product-card .product-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

.product-card .product-material {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    font-weight: 500;
}

.product-card .product-price {
    font-size: 16px;
    font-weight: 700;
    color: #c41e3a;
    letter-spacing: 0.5px;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: #f8f6f0;
    border-color: #d4a853;
    color: #d4a853;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #d4a853 0%, #c49a47 100%);
    border-color: #d4a853;
    color: #fff;
    box-shadow: 0 4px 15px rgba(212,168,83,0.3);
}

.pagination-ellipsis {
    color: #999;
    padding: 0 5px;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.no-products p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

.no-products .btn {
    display: inline-block;
    padding: 14px 30px;
    background: linear-gradient(135deg, #d4a853 0%, #c49a47 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.no-products .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212,168,83,0.3);
}

/* ========================================
   PROMISE SECTION - Fixed Visibility
   ======================================== */
.promise-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.promise-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4a853 0%, #c49a47 50%, #d4a853 100%);
}

.promise-title {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    text-align: center;
    margin-bottom: 50px;
    color: #fff;
    letter-spacing: 2px;
    position: relative;
}

.promise-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #d4a853;
    margin: 20px auto 0;
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.promise-card {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    transition: all 0.3s;
}

.promise-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(212,168,83,0.3);
    transform: translateY(-5px);
}

.promise-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    margin-bottom: 20px;
    color: #d4a853;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.promise-card p {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    line-height: 1.8;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
.filter-toggle {
    display: none;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 25px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.filter-toggle::before {
    content: '☰';
    font-size: 16px;
}

@media (max-width: 1024px) {
    .category-layout {
        grid-template-columns: 240px 1fr;
        gap: 35px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .category-banner {
        height: auto !important;
        min-height: auto !important;
        aspect-ratio: 3 / 1;
        background-size: 100% 100%;
        background-position: center center;
        background-repeat: no-repeat;
    }
    
    .category-banner-title {
        font-size: 32px;
        letter-spacing: 2px;
    }
    
    .category-banner-subtitle {
        font-size: 12px;
        margin-top: 6px;
        padding: 0 15px;
    }
    
    .quick-actions-bar .container {
        flex-direction: column;
    }
    
    .quick-action-btn {
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 14px;
    }
    
    .quick-action-btn:last-child {
        border-bottom: none;
    }
    
    .quick-action-btn::before {
        display: none;
    }
    
    .category-section {
        padding: 30px 0 50px;
    }
    
    .category-layout {
        grid-template-columns: 1fr;
    }
    
    .filter-toggle {
        display: flex;
    }
    
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        padding: 25px;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 5px 0 30px rgba(0,0,0,0.15);
    }
    
    .filter-sidebar.active {
        left: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        max-width: none;
        width: 100%;
        margin: 0 auto;
        border-radius: 10px;
    }
    
    .product-card .product-image {
        padding: 0;
        aspect-ratio: 4 / 3;
    }
    
    .product-card .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        padding: 20px;
        display: block;
    }
    
    .product-card .product-info {
        padding: 15px 15px 20px;
    }
    
    .product-card .product-name {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .product-card .product-material {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .product-card .product-price {
        font-size: 15px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 15px;
    }
    
    .sort-dropdown {
        justify-content: space-between;
    }
    
    .promise-section {
        padding: 50px 0;
    }
    
    .promise-title {
        font-size: 24px;
    }
    
    .promise-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .promise-card {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .category-banner-title {
        font-size: 26px;
    }
    
    .category-banner-subtitle {
        font-size: 11px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .product-card .product-image {
        padding: 0;
    }
    
    .product-card .product-image img {
        padding: 15px;
    }
    
    .product-card .product-info {
        padding: 12px 12px 18px;
    }
    
    .product-card .product-name {
        font-size: 14px;
    }
}

/* Overlay for mobile filter */
.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Close button for mobile filter */
.filter-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .filter-close {
        display: flex;
    }
    
    .filter-sidebar {
        padding-top: 60px;
    }
}
