/* ========================================
   CATALOGUE PAGE SPECIFIC STYLES
   ======================================== */

/* Ensure footer text is white */
.footer-section p,
.footer-section a {
    color: var(--white) !important;
}

.footer-section a:hover {
    opacity: 0.8;
}

/* ========================================
   CONTACT MODAL
   ======================================== */

.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20001;
    display: none;
}

.contact-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.contact-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.contact-modal-close:hover {
    background: var(--light-color);
    color: var(--dark-color);
}

.contact-modal-content h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.contact-modal-product {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-family: 'Poppins', sans-serif;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    border: 2px solid;
}

.whatsapp-option {
    background: var(--white);
    color: #25D366;
    border-color: #25D366;
}

.whatsapp-option:hover {
    background: #25D366;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.email-option {
    background: var(--white);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.email-option:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.contact-option svg {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .contact-modal-content {
        padding: 1.5rem;
    }

    .contact-modal-content h3 {
        font-size: 1.25rem;
    }

    .contact-option {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   CATEGORY TABS
   ======================================== */

/* Category Tabs Container - Sticky on scroll */
.category-tabs-container {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: var(--light-color);
    padding: 1rem 0;
    margin: 0 -2rem 2rem;
    transition: all 0.3s ease;
}

.category-tabs-container.stuck {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: rgba(253, 246, 227, 0.98);
    backdrop-filter: blur(10px);
}

/* Sticky Sentinel */
.sticky-sentinel {
    height: 1px;
    position: absolute;
    top: -1px;
    visibility: hidden;
}

/* Desktop Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 2rem;
}

.category-tab {
    background: var(--white);
    border: 2px solid var(--accent-color);
    color: var(--dark-color);
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    transition: left 0.2s ease;
    z-index: -1;
}

.category-tab.active::before {
    left: 0;
}

.category-tab.active {
    color: var(--white);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

/* ========================================
   SEARCH
   ======================================== */

.catalogue-search {
    max-width: 500px;
    margin: 0 auto 2rem;
    position: relative;
}

.catalogue-search input {
    width: 100%;
    padding: 12px 45px 12px 18px;
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
}

.catalogue-search input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 12px rgba(139, 69, 19, 0.1);
}

.catalogue-search .search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    pointer-events: none;
}

/* ========================================
   CATALOGUE GRID
   ======================================== */

.catalogue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ========================================
   SHOE CARD
   ======================================== */

.shoe-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.shoe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Image Container - Optimized */
.shoe-image-container {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: var(--light-color);
    cursor: pointer;
}

.shoe-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.shoe-image[data-src] {
    background: linear-gradient(135deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.shoe-image.loaded {
    animation: none;
}

.shoe-image-container:hover .shoe-image {
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 1.5rem 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.shoe-image-container:hover .image-overlay {
    opacity: 1;
}

.shoe-label {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.view-image-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
}

.view-image-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.view-image-btn svg {
    width: 18px;
    height: 18px;
}

/* Card Content */
.shoe-card-content {
    padding: 1.25rem;
}

.shoe-card-content h3 {
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.shoe-price {
    color: var(--secondary-color);
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0.75rem 0;
}

.shoe-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.order-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 11px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.order-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.order-button:active {
    transform: translateY(0);
}

/* ========================================
   EMPTY STATE
   ======================================== */

.category-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.enhanced-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.enhanced-empty-state h3 {
    color: var(--dark-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.enhanced-empty-state p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.catalog-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.whatsapp-catalog-btn,
.search-reset-btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.whatsapp-catalog-btn {
    background: #25D366;
    color: white;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.whatsapp-catalog-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.search-reset-btn {
    background: var(--primary-color);
    color: white;
    border: none;
}

.search-reset-btn:hover {
    background: var(--dark-color);
}

/* ========================================
   IMAGE VIEWER MODAL
   ======================================== */

.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    display: none;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(5px);
}

.image-viewer.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.2s ease;
}

.image-viewer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.image-viewer-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.viewer-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.image-viewer-info {
    padding: 1.25rem;
    text-align: center;
    background: white;
}

.image-viewer-info h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.image-viewer-info p {
    color: var(--secondary-color);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .category-tabs-container {
        top: 70px;
        margin: 0 0 1.5rem;
        padding: 0.75rem 0;
    }

    /* Horizontal Scrolling Tabs */
    .category-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.5rem;
        padding: 0 1rem;
        justify-content: flex-start;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 10px 20px;
        font-size: 0.9rem;
        border-radius: 22px;
        min-width: fit-content;
    }

    /* Visual indicator for scrollability */
    .category-tabs-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(to left, var(--light-color), transparent);
        pointer-events: none;
        z-index: 1;
    }

    .catalogue-search {
        margin: 0 1rem 1.5rem;
    }

    .catalogue-search input {
        padding: 11px 42px 11px 16px;
        font-size: 0.95rem;
    }

    .catalogue-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
        padding: 0 1rem;
    }

    .shoe-image-container {
        height: 180px;
    }

    .image-overlay {
        opacity: 1;
        padding: 1rem 0.75rem 0.75rem;
    }

    .shoe-label {
        font-size: 0.9rem;
    }

    .view-image-btn {
        width: 34px;
        height: 34px;
    }

    .view-image-btn svg {
        width: 16px;
        height: 16px;
    }

    .shoe-card-content {
        padding: 1rem;
    }

    .shoe-card-content h3 {
        font-size: 1rem;
    }

    .shoe-price {
        font-size: 1.15rem;
        margin: 0.5rem 0;
    }

    .shoe-description {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .order-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .category-empty-state {
        padding: 2rem 1rem;
        margin: 1rem;
    }

    .catalog-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .whatsapp-catalog-btn,
    .search-reset-btn {
        width: 100%;
        justify-content: center;
    }

    .image-viewer-content {
        max-width: 95vw;
        max-height: 95vh;
        border-radius: 10px;
    }

    .viewer-image {
        max-height: 65vh;
    }

    .image-viewer-info {
        padding: 1rem;
    }

    .image-viewer-info h3 {
        font-size: 1.15rem;
    }

    .image-viewer-info p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .category-tabs-container {
        top: 65px;
    }

    .catalogue-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .shoe-image-container {
        height: 220px;
    }

    .shoe-card-content h3 {
        font-size: 1.05rem;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    .shoe-card,
    .category-tab,
    .order-button,
    .view-image-btn,
    .image-viewer-close,
    .shoe-image,
    .contact-modal,
    .contact-option {
        transition: none;
        animation: none;
    }
}

/* GPU acceleration for smooth animations */
.shoe-card,
.category-tab,
.shoe-image-container {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize repaints */
.catalogue-grid {
    contain: layout style paint;
}

.shoe-card {
    contain: layout style;
}