/**
 * DigitAlb Shop - Homepage Styles
 * Version 2.0 - Zentriertes Card Layout
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --hp-primary: #e31e24;
    --hp-primary-dark: #c41820;
    --hp-secondary: #1f2937;
    --hp-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --hp-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --hp-shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --hp-radius-sm: 12px;
    --hp-radius-md: 16px;
    --hp-radius-lg: 24px;
}

/* ============================================
   HOMEPAGE BASE
   ============================================ */
.modern-homepage {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    min-height: 100vh;
}

/* ============================================
   HERO SLIDER
   ============================================ */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 48px;
}

.hero-swiper { width: 100%; height: 100%; }
.hero-swiper .swiper-slide { position: relative; }
.hero-swiper img { width: 100%; height: auto; display: block; }
.hero-swiper a { display: block; width: 100%; }

.swiper-pagination-bullet { width: 10px; height: 10px; background: white; opacity: 0.5; }
.swiper-pagination-bullet-active { opacity: 1; background: var(--hp-primary); }

@media (max-width: 768px) { .hero-section { margin-bottom: 32px; } }

/* ============================================
   CONTAINER
   ============================================ */
.container-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title-modern {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--hp-secondary) 0%, var(--hp-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-modern i {
    color: var(--hp-primary);
    -webkit-text-fill-color: var(--hp-primary);
}

/* ============================================
   CATEGORY FILTER PILLS
   ============================================ */
.filter-section { margin-bottom: 24px; }

.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }

.category-pill {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hp-secondary);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-pill:hover {
    border-color: var(--hp-primary);
    color: var(--hp-primary);
    transform: translateY(-2px);
}

.category-pill.active {
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
    border-color: var(--hp-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.3);
}

/* ============================================
   SORT BAR
   ============================================ */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: white;
    border-radius: var(--hp-radius-md);
    box-shadow: var(--hp-shadow-sm);
    margin-bottom: 24px;
}

.items-count { font-size: 0.9rem; color: #64748b; font-weight: 500; }

.sort-select {
    padding: 8px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}
.sort-select:hover { border-color: var(--hp-primary); }

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-grid-modern {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 60px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 576px) {
    .products-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
        gap: 18px;
    }
}

@media (min-width: 768px) {
    .products-grid-modern {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .products-grid-modern {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.modern-card {
    position: relative;
    background: white;
    border-radius: var(--hp-radius-md);
    overflow: hidden;
    box-shadow: var(--hp-shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hp-shadow-lg);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Card Image */
.card-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 100%);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.modern-card:hover .card-image {
    transform: scale(1.05);
}

.card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #cbd5e1;
}

/* Badges */
.card-badge {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
}

.card-badge.sale {
    left: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.card-badge.featured {
    right: 52px;
    background: rgba(250, 204, 21, 0.9);
    color: #92400e;
}

/* Quick View Overlay */
.card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

.modern-card:hover .card-overlay { opacity: 1; }

.btn-quick-view {
    padding: 10px 20px;
    background: white;
    color: var(--hp-secondary);
    border: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-quick-view:hover {
    background: var(--hp-primary);
    color: white;
}

/* ============================================
   CARD CONTENT - ZENTRIERT
   ============================================ */
.card-content {
    padding: 20px;
    text-align: center;
}

.card-category {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hp-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.duration-inline {
    padding: 3px 10px;
    background: rgba(227, 30, 36, 0.1);
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hp-secondary);
    margin-bottom: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features - zentriert */
.card-features {
    margin-bottom: 12px;
    display: inline-block;
    text-align: left;
}

.card-features .feature {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.card-features .feature i {
    color: #10b981;
    flex-shrink: 0;
    margin-top: 4px;
    font-size: 0.85rem;
}

/* ============================================
   CARD FOOTER - ZENTRIERT
   ============================================ */
.card-footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.price-old {
    font-size: 0.95rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.price-current {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.price-euro {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* ============================================
   WISHLIST BUTTON
   ============================================ */
.btn-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-wishlist:hover {
    background: var(--hp-primary);
    color: white;
    transform: scale(1.1);
}

.btn-wishlist.active {
    background: var(--hp-primary);
    color: white;
}

/* ============================================
   CARD CART BUTTON - ZENTRIERT
   ============================================ */
.btn-card-cart {
    display: none;
    width: calc(100% - 32px);
    margin: 16px auto 0;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.3);
}

.btn-card-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(227, 30, 36, 0.4);
    color: white;
}

body.theme-new .btn-card-cart { display: flex; }

/* ============================================
   HORIZONTAL SCROLL SECTIONS
   ============================================ */
.scroll-section { margin-bottom: 48px; }

.products-scroll-modern {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--hp-primary) #f1f5f9;
    -webkit-overflow-scrolling: touch;
}

.products-scroll-modern::-webkit-scrollbar { height: 6px; }
.products-scroll-modern::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.products-scroll-modern::-webkit-scrollbar-thumb { background: var(--hp-primary); border-radius: 4px; }

.products-scroll-modern .modern-card {
    flex: 0 0 280px;
    animation: none;
}

.products-scroll-modern .btn-wishlist {
    background: rgba(255, 255, 255, 0.98);
}

/* ============================================
   SALE SECTION
   ============================================ */
.sale-section {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: var(--hp-radius-lg);
    padding: 32px 24px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.sale-section::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Sale Grid - 2 Spalten */
.sale-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 480px) {
    .sale-grid {
        gap: 12px;
    }
    
    .sale-section {
        padding: 20px 16px;
        margin-bottom: 32px;
    }
}

/* View All Link */
.view-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--hp-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.view-all-link:hover {
    color: var(--hp-primary-dark);
    gap: 10px;
}

.view-all-link i {
    transition: transform 0.3s;
}

.view-all-link:hover i {
    transform: translateX(3px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.products-grid-modern .modern-card { animation: fadeInUp 0.4s ease-out; }

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 576px) {
    .container-modern { padding: 0 16px; }
    .card-content { padding: 14px; }
    .card-title { font-size: 0.95rem; }
    .price-current { font-size: 1.25rem; }
    .card-overlay { display: none; }
    .products-scroll-modern .modern-card { flex: 0 0 260px; }
    .scroll-section { margin-bottom: 32px; }
    .sale-section { padding: 24px 16px; margin-bottom: 32px; }
}