/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #67260C;
    --color-secondary: #AE6534;
    --color-dark: #000000;
    --color-white: #FFFFFF;
    --color-light-gray: #F5F5F5;
    --color-gray: #E0E0E0;
    --color-text: #333333;
    --color-success: #4CAF50;
    --color-error: #F44336;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --header-height: 80px;
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled .navbar {
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    transition: var(--transition);
}

.header:not(.scrolled) .logo {
    color: var(--color-white);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px 0;
}

.header:not(.scrolled) .nav-link {
    color: var(--color-white);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-secondary);
}

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

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

.nav-link-btn {
    font-family: var(--font-family);
    font-size: 1rem;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

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

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    transition: var(--transition);
}

.header:not(.scrolled) .mobile-menu-toggle span {
    background: var(--color-white);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(103, 38, 12, 0.7), rgba(103, 38, 12, 0.7)), 
                url('/images/hero-image-pecan-rusks.jpg') center/cover;
    display: flex;
    align-items: center;
    color: var(--color-white);
    padding-top: var(--header-height);
}

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

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(103, 38, 12, 0.3);
}

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

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

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

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 50px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text);
    margin-top: -30px;
    margin-bottom: 50px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    border-radius: 0px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

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

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.product-description {
    color: var(--color-text);
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-price {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.quantity-selector label {
    font-weight: 500;
}

.quantity-selector input {
    width: 60px;
    padding: 8px;
    border: 2px solid var(--color-gray);
    border-radius: 5px;
    text-align: center;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-gray);
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: var(--transition);
}

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: var(--color-error);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Alerts */
/* Notification Popup */
.notification-popup {
    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: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.notification-content {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-content.success {
    border-left: 5px solid #28A745;
}

.notification-content.error {
    border-left: 5px solid #DC3545;
}

.notification-content svg {
    flex-shrink: 0;
}

.notification-content.success svg {
    color: #28A745;
}

.notification-content.error svg {
    color: #DC3545;
}

.notification-content p {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.notification-content .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.notification-content .close-btn:hover {
    color: #333;
}

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin: 20px 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: var(--color-white);
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--color-white);
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Cart */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-gray);
}

.cart-table th {
    background: var(--color-light-gray);
    font-weight: 600;
    color: var(--color-primary);
}

.cart-summary {
    max-width: 400px;
    margin-left: auto;
    background: var(--color-light-gray);
    padding: 30px;
    border-radius: 10px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.cart-summary-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    padding-top: 15px;
    border-top: 2px solid var(--color-gray);
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 300px;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        gap: 20px;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        color: var(--color-primary) !important;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .process-grid > div {
        order: 0 !important;
    }
    
    .process-grid .btn {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .section {
        padding: 50px 0;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}