/* ===================================
   Birthday-Cake.com.au - Styles
   Modern, Clean UI for Cake Decorating Products
   =================================== */

/* CSS Variables */
:root {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f8bbd9;
    --secondary: #ff9800;
    --secondary-dark: #f57c00;
    --accent: #9c27b0;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #8888a0;

    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f7;
    --bg-gradient: linear-gradient(135deg, #fff5f8 0%, #fff8e1 100%);

    --border-color: #e0e0e0;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 48px rgba(233, 30, 99, 0.15);

    --transition: all 0.3s ease;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-amazon {
    background: #ff9900;
    color: #111;
    font-weight: 600;
}

.btn-amazon:hover {
    background: #e68a00;
    color: #111;
    transform: translateY(-2px);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-au {
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: var(--bg-gradient);
    padding: 80px 0 100px;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Cake Animation */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cake-animation {
    position: relative;
    width: 280px;
    height: 320px;
}

.cake-layer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 8px;
    animation: float 3s ease-in-out infinite;
}

.layer-1 {
    bottom: 0;
    width: 240px;
    height: 80px;
    background: linear-gradient(180deg, #f8bbd9 0%, #e91e63 100%);
    border-radius: 8px 8px 20px 20px;
}

.layer-2 {
    bottom: 80px;
    width: 200px;
    height: 70px;
    background: linear-gradient(180deg, #fff8e1 0%, #ff9800 100%);
    animation-delay: 0.2s;
}

.layer-3 {
    bottom: 150px;
    width: 160px;
    height: 60px;
    background: linear-gradient(180deg, #e1bee7 0%, #9c27b0 100%);
    animation-delay: 0.4s;
}

.cake-candles {
    position: absolute;
    bottom: 210px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
}

.candle {
    width: 10px;
    height: 50px;
    background: linear-gradient(180deg, #fff 0%, #e0e0e0 100%);
    border-radius: 5px 5px 2px 2px;
    position: relative;
}

.flame {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 20px;
    background: linear-gradient(180deg, #ff5722 0%, #ffc107 50%, #fff9c4 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.5s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 0.8; }
}

/* Filter Section */
.filter-section {
    padding: 80px 0 40px;
}

.section-title {
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.view-toggle {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

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

/* Products Section */
.products-section {
    padding: 0 0 80px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    z-index: 10;
}

.product-badge.popular {
    background: var(--secondary);
}

.product-badge.best-value {
    background: var(--success);
}

.product-image {
    position: relative;
    height: 200px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, white 0%, transparent 100%);
}

.product-content {
    padding: 20px;
}

.product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.4;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.feature-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-price .currency {
    font-size: 1rem;
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.compare-btn {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.compare-btn:hover,
.compare-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Table View */
.products-table-wrapper {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.products-table th,
.products-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.products-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.products-table tbody tr:hover {
    background: var(--bg-secondary);
}

.products-table .product-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-table .table-icon {
    font-size: 2rem;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: var(--bg-gradient);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

.quiz-header {
    text-align: center;
    margin-bottom: 32px;
}

.quiz-header h2 {
    margin-bottom: 8px;
}

.quiz-header p {
    color: var(--text-muted);
}

.quiz-progress {
    margin-bottom: 40px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 25%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.quiz-question h3 {
    text-align: center;
    margin-bottom: 24px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz-option:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
}

.quiz-option.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

.option-icon {
    font-size: 2rem;
}

.option-text {
    font-weight: 600;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quiz-result {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.result-product {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 24px 0;
}

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

/* Compare Section */
.compare-section {
    padding: 80px 0;
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.compare-slot {
    min-height: 300px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.compare-slot:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.slot-icon {
    font-size: 3rem;
    font-weight: 300;
}

.slot-product {
    width: 100%;
    height: 100%;
    padding: 24px;
}

.slot-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--error);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slot-remove:hover {
    transform: scale(1.1);
}

.compare-table-wrapper {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.compare-table th,
.compare-table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.compare-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: var(--bg-secondary);
}

.compare-table .highlight {
    background: var(--primary-light);
    font-weight: 600;
    color: var(--primary-dark);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-product-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.modal-product-item:hover {
    background: var(--bg-tertiary);
}

.modal-product-icon {
    font-size: 2.5rem;
}

.modal-product-info {
    flex: 1;
}

.modal-product-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.modal-product-price {
    color: var(--primary);
    font-weight: 600;
}

/* Guide Section */
.guide-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.guide-card {
    background: white;
    padding: 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.guide-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.guide-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.guide-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: var(--bg-tertiary);
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    margin-bottom: 24px;
    text-align: center;
}

.seo-content h3 {
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.seo-content p {
    margin-bottom: 16px;
    text-align: justify;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
    font-size: 0.9rem;
}

.footer-brand .logo-text {
    color: white;
}

.footer-links h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.affiliate-notice {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .cake-animation {
        transform: scale(0.8);
    }

    .compare-slots {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow-md);
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 40px 0 60px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .view-toggle {
        margin-left: 0;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .quiz-container {
        padding: 24px;
    }

    .quiz-option {
        flex-direction: column;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .product-footer {
        flex-direction: column;
    }

    .product-actions {
        width: 100%;
    }

    .product-actions .btn {
        flex: 1;
    }
}
