/**
 * Turocraft Shop - Main Stylesheet
 * Version 2.0
 * 
 * Modular CSS Architecture
 * CSS Variables can be overridden inline in layout.php for tenant customization
 */

@import url('shop/base.css');
@import url('shop/components.css');
@import url('shop/header.css');
@import url('shop/products.css');
@import url('shop/cart.css');

/* ==========================================================================
   Modal System
   ========================================================================== */
#customModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#customModal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    animation: modalFadeIn 0.15s ease;
}

#customModal .modal-content {
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    max-width: 400px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalSlideIn 0.2s ease;
}

#customModal .modal-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

#customModal .modal-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

#customModal .modal-btn-primary {
    background: #2563eb;
    color: white;
}

#customModal .modal-btn-primary:hover {
    background: #1d4ed8;
}

#customModal .modal-btn-secondary {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

#customModal .modal-btn-secondary:hover {
    background: #f9fafb;
}

#customModal .modal-btn-danger {
    background: #dc2626;
    color: white;
}

#customModal .modal-btn-danger:hover {
    background: #b91c1c;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================
   Empfohlene Produkte & Kunden kauften auch
   ========================================== */
.product-recommendations {
    max-width: 800px;
    margin: 3rem 0;
    padding: 0;
}

.product-recommendations h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text, #1f2937);
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.875rem;
    max-width: 900px;
}

.rec-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    max-width: 160px;
}

.rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.rec-image {
    aspect-ratio: 1;
    background: #f9fafb;
    overflow: hidden;
    max-height: 140px;
}

.rec-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rec-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rec-info {
    padding: 0.75rem;
}

.rec-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text, #1f2937);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
}

.also-bought {
    padding: 1.5rem 0;
    margin: 0;
    max-width: none;
}

.also-bought .recommendation-grid {
    max-width: 900px;
}

@media (max-width: 900px) {
    .recommendation-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .rec-card {
        max-width: none;
    }
}

@media (max-width: 600px) {
    .recommendation-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    .rec-info {
        padding: 0.5rem;
    }
    .rec-name {
        font-size: 0.75rem;
    }
    .rec-price {
        font-size: 0.8rem;
    }
    .rec-image {
        max-height: 100px;
    }
}
