:root {
    --primary: #E30613; /* Fressnapf Red */
    --primary-hover: #c20510;
    --secondary: #2D5A27; /* Masterfeed Green */
    --accent: #E8D3A3; /* Gold/Cream */
    --bg-light: #fdfdfd;
    --text-dark: #1a1a1a;
    --text-muted: #666666;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-fressnapf { color: var(--primary); }
.logo-masterfeed { color: var(--secondary); }
.logo-divider { color: #ddd; font-weight: 300; }

/* Hero */
.hero {
    padding: 80px 0 40px;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.hero h1 span { color: var(--primary); }
.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    transition: var(--transition);
}

.card-header {
    margin-bottom: 30px;
}

.card-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

input {
    padding: 14px 18px;
    border: 1.5px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.1);
}

/* Product Grid */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 50px;
}

.selection-counter {
    margin-top: 15px;
    background: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.product-image {
    height: 200px;
    background: #f9f9f9;
    position: relative;
    overflow: hidden;
}

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

.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-pack-size {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary);
    background: rgba(45, 90, 39, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 8px;
    width: fit-content;
}

.product-footer {
    padding: 15px;
    border-top: 1px solid #f5f5f5;
    text-align: center;
}

.select-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0.5;
    transition: var(--transition);
}

.product-card.selected {
    border-color: var(--primary);
}

.product-card.selected .select-overlay {
    background: var(--primary);
    color: white;
    opacity: 1;
}

/* Submit Section */
.submit-card {
    background: #1a1a1a;
    color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.btn {
    padding: 16px 36px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1.1rem;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-primary:disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid #eee;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 50px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4BB543;
    color: white;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
    .submit-card { flex-direction: column; gap: 20px; text-align: center; }
}
