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

:root {
    --primary-green: #10b981;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --gray-dark: #374151;
    --gray-light: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--gray-dark);
    line-height: 1.6;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-green);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray-dark);
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

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

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

.nav-menu {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green);
    border-bottom: 2px solid var(--primary-green);
}

.header-right {
    display: flex;
    align-items: center;
}

.cart-link {
    position: relative;
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.cart-link:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Main Content */
.legal-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
}

.legal-container {
    background-color: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.legal-container h1 {
    font-size: 2.5rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary-green);
    padding-bottom: 1rem;
}

.last-updated {
    color: #6b7280;
    font-style: italic;
    margin-bottom: 2rem;
}

/* Legal Sections */
.legal-section {
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.legal-section h2 {
    font-size: 1.5rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--primary-green);
}

.legal-section h3 {
    font-size: 1.2rem;
    color: var(--gray-dark);
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

.legal-section p {
    color: #6b7280;
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-section ul li {
    margin-bottom: 0.75rem;
    color: #6b7280;
}

.legal-section ul li ul {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.legal-section ul li ul li {
    margin-bottom: 0.5rem;
}

.legal-section a {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

.legal-section a:hover {
    text-decoration: underline;
    color: #059669;
}

/* Footer */
.footer {
    background-color: var(--gray-dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.footer-section p {
    font-size: 0.95rem;
    line-height: 1.8;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4b5563;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.9rem;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #059669;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .legal-container {
        padding: 2rem;
    }

    .legal-container h1 {
        font-size: 1.8rem;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }

    .legal-section p {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem;
    }

    .logo-text {
        display: none;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .legal-main {
        padding: 1rem;
    }

    .legal-container {
        padding: 1.5rem;
        border-radius: 8px;
    }

    .legal-container h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .legal-section {
        margin-bottom: 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.1rem;
        margin-top: 1rem;
    }

    .legal-section h3 {
        font-size: 1rem;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
