/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --accent: #e8b931;
    --bg: #f5f5f7;
    --card-bg: #ffffff;
    --text: #1d1d1f;
    --text-light: #6e6e73;
    --border: #e5e5e7;
    --success: #34c759;
    --radius: 16px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* === Header === */
.header {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.club-logo {
    height: 48px;
    width: auto;
}

.partner-logo {
    height: 36px;
    width: auto;
    margin-left: 0.5rem;
    opacity: 0.85;
}

.header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 300;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stl-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.stl-link:hover {
    background: rgba(255,255,255,0.15);
}

.cart-btn {
    position: relative;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 0.7rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.cart-btn:hover { background: rgba(255,255,255,0.25); }

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Category Nav === */
.category-nav {
    display: flex;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cat-btn {
    padding: 0.5rem 1.2rem;
    border: 2px solid var(--border);
    background: var(--card-bg);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

.cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.cat-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* === Product Card === */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, #e8ecf1 0%, #d1d9e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.3;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    z-index: 2;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.product-card-body {
    padding: 1rem 1.2rem;
}

.product-card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.product-card-body .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.product-card-body .colors-preview {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.color-dot.white { background: #ffffff; }
.color-dot.navy { background: #1b2a4a; }
.color-dot.grau { background: #9ca3af; }

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.05);
    border: none;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover { background: rgba(0,0,0,0.1); }

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-img {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #e8ecf1 0%, #d1d9e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius) 0 0 var(--radius);
    overflow: hidden;
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.product-details {
    background: var(--bg);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.product-material {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.product-info {
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.product-joma {
    font-size: 0.75rem;
    color: var(--text-light);
    opacity: 0.7;
    font-style: italic;
}

.modal-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.option-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.option-group label input[type="checkbox"] {
    margin-right: 0.4rem;
    accent-color: var(--primary);
}

.extra-hint {
    font-weight: 400;
    text-transform: none;
    font-size: 0.8rem;
    color: var(--text-light);
}

.color-options, .size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-opt, .size-opt {
    padding: 0.4rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    background: var(--card-bg);
    font-family: inherit;
}

.color-opt:hover, .size-opt:hover { border-color: var(--primary); }
.color-opt.selected, .size-opt.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.initials-input {
    margin-top: 0.4rem;
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    text-transform: uppercase;
    width: 80px;
    text-align: center;
    transition: var(--transition);
}

.initials-input:focus {
    outline: none;
    border-color: var(--primary);
}

.initials-input:disabled {
    opacity: 0.4;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.qty-control button {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.qty-control button:hover { background: var(--bg); }

.qty-control span {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 2px solid var(--border);
    font-size: 1.1rem;
    font-weight: 600;
}

#modalTotal {
    font-size: 1.3rem;
    color: var(--primary);
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.add-to-cart-btn:hover { background: var(--primary-light); }

/* === Cart Sidebar === */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 150;
    display: none;
}

.cart-overlay.active { display: block; }

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--card-bg);
    z-index: 160;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    transition: right 0.35s ease;
}

.cart-sidebar.open { right: 0; }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.cart-header h2 { font-size: 1.2rem; }
.cart-header .modal-close { position: static; }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.cart-empty {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 0;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.cart-item-info { flex: 1; }

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.cart-item-info .cart-item-details {
    font-size: 0.8rem;
    color: var(--text-light);
}

.cart-item-info .cart-item-price {
    font-weight: 600;
    color: var(--primary);
    margin-top: 0.3rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff3b30;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.checkout-btn:hover { background: var(--primary-light); }

/* === Checkout Modal === */
.modal-checkout {
    max-width: 600px;
    padding: 2rem;
}

.modal-checkout h2 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.checkout-summary {
    background: var(--bg);
    border-radius: 12px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.checkout-summary h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid var(--border);
    padding-top: 0.8rem;
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.privacy-consent {
    margin: 1rem 0;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
}

.privacy-consent label {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    cursor: pointer;
}

.privacy-consent input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: var(--primary);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.privacy-consent a {
    color: var(--primary);
}

.submit-btn {
    margin-top: 1rem;
    background: var(--success);
}

.submit-btn:hover { background: #2db84e; }

/* === Success Modal === */
.modal-success {
    max-width: 480px;
    padding: 3rem 2rem;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.modal-success h2 { margin-bottom: 1rem; }
.modal-success p { color: var(--text-light); margin-bottom: 0.5rem; }
.modal-success .checkout-btn { margin-top: 1.5rem; }

/* === Shop the Look === */
.shop-the-look {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    scroll-margin-top: 80px;
}

.shop-the-look h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.stl-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.stl-category {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
}

.stl-category:first-of-type {
    margin-top: 0;
}

.outfit-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.outfit-slider::-webkit-scrollbar {
    height: 6px;
}

.outfit-slider::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.outfit-card {
    min-width: 320px;
    max-width: 360px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    scroll-snap-align: start;
    flex-shrink: 0;
    transition: transform var(--transition), box-shadow var(--transition);
}

.outfit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.outfit-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #e8ecf1 0%, #d1d9e6 100%);
    overflow: hidden;
}

.outfit-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.outfit-details {
    padding: 1rem 1.2rem 1.2rem;
}

.outfit-details h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.8rem;
}

.outfit-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.outfit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
    transition: background var(--transition);
}

.outfit-item:hover {
    background: #e8ecf1;
}

.outfit-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    background: white;
}

.outfit-item-info {
    display: flex;
    flex-direction: column;
}

.outfit-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.outfit-item-price {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
}

.outfit-total {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

/* === Unavailable Size === */
.size-opt.unavailable {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
    background: #f2f2f7;
}

.size-opt.unavailable:hover {
    border-color: var(--border);
}

.unavailable-notice {
    font-size: 0.8rem;
    color: #ff9500;
    font-weight: 500;
    margin-top: 0.3rem;
}

/* === Product Card Unavailable Overlay === */
.product-card.all-unavailable {
    opacity: 0.5;
    position: relative;
}

.product-card.all-unavailable::after {
    content: "Bald wieder lieferbar";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 58, 92, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    white-space: nowrap;
}

/* === Coupon Input === */
.coupon-input-row {
    display: flex;
    gap: 0.5rem;
}

.coupon-input-row input {
    flex: 1;
}

.coupon-apply-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.coupon-apply-btn:hover {
    background: var(--primary-light);
}

.coupon-message {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    min-height: 1.2em;
}

.coupon-message.success {
    color: var(--success);
    font-weight: 500;
}

.coupon-message.error {
    color: #ff3b30;
    font-weight: 500;
}

.checkout-coupon-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.3rem 0;
    color: var(--success);
    font-weight: 600;
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

.footer p { margin-bottom: 0.3rem; }

/* === Responsive === */
@media (max-width: 768px) {
    .header { padding: 1rem; }
    .header h1 { font-size: 1.1rem; }
    .category-nav { padding: 1rem; }
    .product-grid { padding: 0 1rem 2rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }

    .modal-body { grid-template-columns: 1fr; }
    .modal-img { aspect-ratio: 4/3; border-radius: var(--radius) var(--radius) 0 0; }
    .modal-info { padding: 1.5rem; }

    .form-row { grid-template-columns: 1fr; }

    .shop-the-look { padding: 1.5rem 1rem 2rem; }
    .outfit-card { min-width: 280px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .product-card-body { padding: 0.8rem; }
    .product-card-body h3 { font-size: 0.85rem; }
    .product-card-body .price { font-size: 0.95rem; }
}
