/* Shop/Catalogue Page Styles - Refactored Architecture */

/* Shop Introduction - Minimal */
.shop-intro {
    text-align: center;
    margin-bottom: 60px;
}

.shop-intro h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-black);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.shop-intro p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.shop-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 8px;
    letter-spacing: 0;
}

.premium-placeholder {
    background: linear-gradient(135deg, #f8f8f8 0%, #eeeeee 100%);
}

.premium-placeholder .product-placeholder {
    color: #555;
    font-weight: 500;
}

.shop-intro p:last-child {
    margin-bottom: 0;
}

/* Shop Philosophy - Minimal */
.shop-philosophy {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.shop-philosophy p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.shop-philosophy p:last-child {
    margin-bottom: 0;
}

/* Override main.css .page width constraint for shop layout */
.shop-page.page {
    max-width: 1400px;
}

/* Create separate content container for shop layout while preserving header/footer positioning */
.shop-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Shop content styling - interaction conflicts resolved in main.css */

/* CRITICAL: Ensure consistent wordmark/footer positioning on shop page */
.shop-page .wordmark-section {
    margin-bottom: 80px !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.shop-page .footer-section {
    margin-bottom: 40px !important;
    margin-top: 80px !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Also constrain navigation to standard width */
.shop-page .navigation {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Product Grid - Base Desktop Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 100px 50px;
    margin: 60px auto 80px auto;
    padding: 0 60px;
    max-width: 1000px;
    width: 100%;
}

.product-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    
    /* Modern mobile tap elimination - clean approach */
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Base product card styling with transitions */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

/* Desktop hover effects - image lift only */
.desktop-hover-enabled .product-card.hover-active .product-image {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.desktop-hover-enabled .product-card.hover-active .product-info h3 {
    color: var(--color-gold);
}

.product-card:focus,
.product-card:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Mobile-only hover override - prevents mobile activation while preserving desktop */
@media (max-width: 768px) {
    .product-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Clean mobile tap handling - no redundant overrides needed */

/* Product card interaction styles handled by main.css mobile protection */

.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 140%;
    background: linear-gradient(135deg, #f8f8f8 0%, #eeeeee 100%);
    border-radius: 3px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.product-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    font-size: 0.8rem;
    z-index: 1;
}

.product-placeholder .product-name {
    margin: 8px 0;
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.product-placeholder .view-type {
    font-size: 0.6rem;
    opacity: 0.7;
    font-weight: 300;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-align: left;
}

.product-info h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
    color: var(--color-black);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex: 1;
}

.product-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-black);
    margin: 0;
    letter-spacing: 0;
    text-align: right;
    flex-shrink: 0;
}

/* Hide descriptions in ALD-style grid */
.product-description {
    display: none;
}

/* Inline Links */
.inline-link {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 400;
    border-bottom: 1px solid var(--color-gold);
    padding-bottom: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.inline-link:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}

/* Shop Details */
.shop-details {
    margin: 120px 0;
    padding: 0 20px;
}

.shop-details p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.shop-details p:first-child {
    margin-bottom: 24px;
}

.shop-details p:last-child {
    margin-bottom: 0;
}

/* Responsive Design - Mobile First Approach */

/* Tablet Portrait */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        gap: 24px;
        margin: 40px auto;
        padding: 0 30px;
        max-width: 700px;
    }
    
    .product-image {
        margin-bottom: 12px;
    }
    
    .product-info h3,
    .product-price {
        font-size: 0.8rem;
        font-weight: 500;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* CRITICAL: Ensure mobile wordmark/footer positioning matches homepage */
    .shop-page .wordmark-section {
        margin-bottom: 60px !important;
    }
    
    .shop-page .footer-section {
        margin-bottom: 40px !important;
        margin-top: 60px !important;
    }
    
    .shop-intro {
        margin-bottom: 40px;
    }
    
    .shop-intro h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .shop-philosophy {
        margin-bottom: 40px;
        padding: 0 16px;
    }
    
    .product-grid {
        gap: 50px 20px;
        margin: 30px auto;
        padding: 0 12px;
        max-width: 100%;
    }
    
    .product-image {
        padding-bottom: 160%;
        margin-bottom: 10px;
    }
    
    .product-info h3,
    .product-price {
        font-size: 0.8rem;
        font-weight: 500;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .product-grid {
        gap: 40px 15px;
    }
    
    .product-image {
        padding-bottom: 160%;
        margin-bottom: 8px;
    }
    
    .product-info h3,
    .product-price {
        font-size: 0.7rem;
        font-weight: 500;
        line-height: 1.1;
    }
}

/* Lazy Loading Styles */
.loading-placeholder {
    transition: opacity 0.3s ease;
}

.product-image.image-loaded .loading-placeholder {
    opacity: 0;
    pointer-events: none;
}

.product-image.image-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.product-image.image-error .loading-placeholder {
    color: #d32f2f;
}

.product-image.image-error .loading-placeholder::after {
    content: " (Error)";
    font-size: 0.6rem;
    opacity: 0.7;
}

/* Progressive Enhancement - noscript fallback */
.fallback-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

/* Desktop Enhancement */
@media (min-width: 1025px) {
    .shop-intro h1 {
        font-size: 2.8rem;
        margin-bottom: 32px;
    }
    
    .shop-philosophy {
        margin-bottom: 80px;
    }
}