/**
 * ============================================
 * MARBLE CATALOG STYLES
 * Aegean Stone Imports LLC
 * ============================================
 */


/* ============================================
   PAGE HEADER - Compact
   ============================================ */
.page-header {
    padding: 100px 0 30px;
    background: var(--color-black-soft);
    text-align: center;
}

.page-header .label2 {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-orange);
    margin: 0 auto var(--space-xs) auto;
    text-align: center;
    padding-top: 15px;
}

.page-header h1 {
    color: var(--color-white);
    margin-bottom: var(--space-sm);
    font-size: 2.5rem;
}

.page-header h1 em {
    font-style: italic;
    color: var(--color-orange);
}

.page-intro {
    color: var(--color-gray-light);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}


/* ============================================
   CATEGORY CARDS - Compact Row
   ============================================ */
.category-cards {
    background: var(--color-black);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

.category-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-black-soft);
    border: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.category-card:hover {
    border-color: var(--color-orange);
    background: rgba(232, 90, 30, 0.05);
}

.category-card.active {
    border-color: var(--color-orange);
    background: rgba(232, 90, 30, 0.1);
}

.category-card .card-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: var(--color-orange);
}

.category-card .card-icon svg {
    width: 100%;
    height: 100%;
}

.category-card .card-text h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--color-white);
    margin: 0;
    line-height: 1.2;
}

.category-card .card-text p {
    font-size: 0.75rem;
    color: var(--color-gray-light);
    margin: 2px 0 0 0;
}


/* ============================================
   CATALOG LAYOUT - Tighter Spacing
   ============================================ */
.marble-catalog {
    background: var(--color-black);
    padding-top: var(--space-md);
}

.marble-catalog.section {
    padding-bottom: var(--space-lg);
}

.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-lg);
}


/* ============================================
   SIDEBAR FILTERS
   ============================================ */
.catalog-sidebar {
    padding-right: 10px;
}

.filter-section {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-title {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-orange);
    margin-bottom: var(--space-sm);
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 2px;
}

.filter-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--color-gray-light);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-quick);
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--color-white);
}

.filter-list a.active {
    font-weight: 600;
}

.filter-list a.active::before {
    content: none;
}

.filter-list a.active .filter-icon svg {
    stroke: var(--color-orange);
}

.filter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.filter-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-orange);
    transition: stroke var(--transition-quick);
}

/* Color Swatches */
.color-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.color-filters li {
    margin-bottom: 0;
}

.color-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 6px 10px !important;
    font-size: 0.7rem !important;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
}

.color-swatch.active {
    border-color: var(--color-orange);
}

.color-white { background: linear-gradient(135deg, #fff 0%, #eee 100%); color: #333 !important; }
.color-grey { background: linear-gradient(135deg, #888 0%, #666 100%); }
.color-beige { background: linear-gradient(135deg, #d4c4a8 0%, #b8a888 100%); color: #333 !important; }
.color-green { background: linear-gradient(135deg, #6b8e6b 0%, #4a6b4a 100%); }
.color-black { background: linear-gradient(135deg, #333 0%, #111 100%); }

.clear-filters {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 0.8rem;
    color: var(--color-orange);
    text-decoration: none;
    cursor: pointer;
}

.clear-filters:hover {
    text-decoration: underline;
}


/* ============================================
   CATALOG TOOLBAR (Count + Unit Toggle)
   ============================================ */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.product-count {
    font-size: 0.85rem;
    color: var(--color-gray-light);
}

/* Unit Toggle - Single Button Style */
.unit-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unit-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-white);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    transition: all var(--transition-quick);
}

.unit-toggle-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.unit-toggle-btn .unit-value {
    color: var(--color-orange);
    min-width: 20px;
}

.unit-toggle-btn .toggle-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}


/* ============================================
   PRODUCT GRID
   ============================================ */
.catalog-main {
    min-height: 400px;
}

.products-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.marble-catalog .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
    transition: opacity 0.2s ease;
}

.marble-catalog .product-card {
    background: var(--color-black-soft);
    overflow: hidden;
    transition: transform var(--transition-smooth);
}

.marble-catalog .product-card:hover {
    transform: translateY(-5px);
}

.marble-catalog .product-card .product-image {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #E8E8E8 0%, #D0D0D0 30%, #B8B8B8 60%, #A0A0A0 100%);
    cursor: pointer;
}

.marble-catalog .product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

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

.marble-catalog .product-card .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.7) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-md);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.marble-catalog .product-card:hover .product-overlay {
    opacity: 1;
}

.marble-catalog .product-overlay .product-category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-orange);
    margin-bottom: var(--space-xs);
}

.marble-catalog .product-overlay h3 {
    font-size: 1.15rem;
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.marble-catalog .product-overlay p {
    font-size: 0.8rem;
    color: var(--color-gray-light);
    margin-bottom: var(--space-sm);
}

.marble-catalog .product-overlay .btn-small,
.btn-small {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--color-orange);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.marble-catalog .product-overlay .btn-small:hover,
.btn-small:hover {
    background: var(--color-orange-light);
    transform: translateY(-2px);
}

.marble-catalog .product-card .product-info {
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.marble-catalog .product-info .product-type {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-orange);
}

.marble-catalog .product-info h3 {
    font-size: 0.95rem;
    color: var(--color-white);
    margin: 4px 0;
}

.marble-catalog .product-info .product-dimensions {
    margin-top: 2px;
}

.marble-catalog .product-info .product-thickness {
    margin-top: 4px;
}

/* Measurement Pills */
.measurement-pill {
    display: inline-block;
    padding: 2px 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.7);
    margin: 1px;
    white-space: nowrap;
}

.measurement-separator {
    display: inline-block;
    color: rgba(255,255,255,0.3);
    margin: 0 1px;
    font-size: 0.6rem;
}

.catalog-pill {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    font-size: 0.6rem;
}

.product-catalog {
    float: right;
    margin: 0;
}

.product-catalog .spec-icon {
    display: none;
}

.marble-catalog .product-info .product-dimensions,
.marble-catalog .product-info .product-thickness {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.marble-catalog .product-info .spec-icon {
    width: 11px;
    height: 11px;
    opacity: 0.5;
    flex-shrink: 0;
    margin-right: 2px;
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.7rem;
}

/* No results message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-gray-light);
}

.no-results h3 {
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}


/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .catalog-layout {
        grid-template-columns: 180px 1fr;
        gap: var(--space-md);
    }
}


/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .cards-row {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xs);
    }
    
    .category-card {
        padding: var(--space-xs) var(--space-sm);
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
    }
    
    .category-card .card-icon {
        width: 28px;
        height: 28px;
    }
    
    .category-card .card-text p {
        display: none;
    }
    
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .catalog-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-md);
        padding-bottom: var(--space-md);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: var(--space-md);
    }
    
    .filter-section {
        flex: 1;
        min-width: 140px;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .catalog-toolbar {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .marble-catalog .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-sm);
    }
}

/* ============================================
   STONE PAGE SPECIFIC STYLES
   ============================================ */

/* Supplier Info Section */
.supplier-info {
    padding: 4rem 0;
}

.supplier-card {
    background: var(--color-black-soft);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    text-align: center;
}

.supplier-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.supplier-content p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.supplier-location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gold) !important;
}

/* Scrollable category cards for many categories */
.cards-scrollable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    flex-wrap: nowrap;
}

.cards-scrollable::-webkit-scrollbar {
    height: 4px;
}

.cards-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.cards-scrollable .category-card {
    flex-shrink: 0;
    min-width: 140px;
}

/* Stone color swatches - direct backgrounds */
.color-swatch.color-green { background: linear-gradient(135deg, #5A8C69 0%, #4A7C59 100%); }
.color-swatch.color-gray { background: linear-gradient(135deg, #909090 0%, #707070 100%); }
.color-swatch.color-black-gray { background: linear-gradient(135deg, #5A5A5A 0%, #3A3A3A 100%); }
.color-swatch.color-blue-black { background: linear-gradient(135deg, #3C4E60 0%, #2C3E50 100%); }
.color-swatch.color-black { background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%); }
.color-swatch.color-brown { background: linear-gradient(135deg, #9B5523 0%, #7B3503 100%); }
.color-swatch.color-brown-green { background: linear-gradient(135deg, #7B6B4D 0%, #5B4B2D 100%); }
.color-swatch.color-beige { background: linear-gradient(135deg, #E4C8A6 0%, #C4A886 100%); color: #333 !important; }
.color-swatch.color-beige-brown { background: linear-gradient(135deg, #B68B6B 0%, #966B4B 100%); }
.color-swatch.color-wood-stone { background: linear-gradient(135deg, #9B8365 0%, #7B6345 100%); }
.color-swatch.color-mixed { 
    background: linear-gradient(135deg, #4A7C59 0%, #808080 35%, #8B4513 70%, #2C3E50 100%);
}

/* ============================================
   PRODUCT MODAL
   ============================================ */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    background: var(--color-black-soft);
    max-width: 1100px;
    width: 95%;
    max-height: 90vh;
    margin: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--color-orange);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    min-height: 400px;
}

.modal-image {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 70vh;
}

.modal-details {
    padding: 40px 45px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-id {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    border-radius: 3px;
    align-self: flex-start;
}

.modal-category {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-orange);
}

.modal-details h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--color-white);
    margin: 0;
}

.modal-marble {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.modal-description {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin: 10px 0;
}

.modal-specs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 15px 0;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
}

.modal-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.modal-spec .spec-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.modal-spec .spec-label svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
}

.modal-spec .spec-value {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.modal-actions .add-to-quote-btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
}

/* Modal responsive */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        max-height: 300px;
    }
    
    .modal-details {
        padding: 25px;
    }
    
    .modal-details h2 {
        font-size: 1.4rem;
    }
}
