/* ===========================
   RESET & BASE STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Vintage Color Palette */
    --primary-color: #8B4513;        /* Saddle Brown */
    --secondary-color: #D4AF37;      /* Gold */
    --accent-color: #2F4F4F;         /* Dark Slate Gray */
    --cream: #FFF8DC;                /* Cornsilk */
    --vintage-red: #A0522D;          /* Sienna */
    --vintage-green: #556B2F;        /* Dark Olive Green */
    --text-dark: #2C1810;            /* Dark Brown */
    --text-light: #6B5A4D;           /* Medium Brown */
    --border-color: #D2B48C;         /* Tan */
    --background: #FAF7F2;           /* Off White */
    --white: #FFFFFF;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text-dark);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ===========================
   NAVIGATION
   =========================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--vintage-red));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

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

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream);
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 80%;
}

.cart-badge {
    background: var(--secondary-color);
    color: var(--text-dark);
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: 0.5rem;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--vintage-red));
    color: var(--cream);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #C9A02C;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.btn-text {
    background: none;
    color: var(--text-light);
    padding: 0.5rem;
    font-size: 0.9rem;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--vintage-red);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    background: linear-gradient(135deg, rgba(139,69,19,0.9), rgba(160,82,45,0.9)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23D4AF37" width="1200" height="600"/><circle fill="%238B4513" opacity="0.1" cx="200" cy="150" r="100"/><circle fill="%238B4513" opacity="0.1" cx="800" cy="400" r="150"/></svg>');
    background-size: cover;
    background-position: center;
    color: var(--cream);
    padding: 8rem 0;
    text-align: center;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--cream);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease;
}

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

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

/* ===========================
   SECTIONS
   =========================== */
.about-section,
.features-section,
.testimonials-section,
.products-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 1rem auto 0;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.about-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Features Section */
.features-section {
    background: var(--cream);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.feature-card p {
    font-size: 0.9rem;
}

/* ===========================
   TESTIMONIALS
   =========================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary-color);
    transition: all 0.3s ease;
}

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

.testimonial-stars {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    color: var(--primary-color);
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ===========================
   NEWSLETTER
   =========================== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--vintage-red));
    color: var(--cream);
    padding: 4rem 0;
    text-align: center;
}

.newsletter-content h2 {
    color: var(--cream);
    margin-bottom: 1rem;
}

.newsletter-content p {
    color: var(--cream);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 1rem 2rem;
}

/* ===========================
   CTA SECTION
   =========================== */
.cta-section {
    background: var(--cream);
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ===========================
   PRODUCTS PAGE
   =========================== */
.products-header {
    background: linear-gradient(135deg, var(--accent-color), var(--vintage-green));
    color: var(--cream);
    padding: 3rem 0;
    text-align: center;
}

.products-header h1 {
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.products-header p {
    color: var(--cream);
    font-size: 1.1rem;
}

/* Filters */
.filters-section {
    background: var(--white);
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
}

.filters-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.filter-group input[type="text"],
.filter-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.filter-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

.filter-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    cursor: pointer;
    border-radius: 50%;
}

.filter-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.results-count {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 1rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--cream);
    cursor: pointer;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-era-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    display: inline-block;
    background: var(--accent-color);
    color: var(--cream);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.product-name {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.product-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.product-condition {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

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

.product-actions {
    flex: 1;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.qty-btn {
    background: var(--primary-color);
    color: var(--cream);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--vintage-red);
    transform: scale(1.1);
}

.quantity {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

.cart-quantity-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--vintage-red);
    color: var(--cream);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    animation: badge-pulse 2s infinite;
}

.no-results {
    text-align: center;
    padding: 4rem 0;
}

.no-results h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* ===========================
   PRODUCT MODAL
   =========================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 0;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--vintage-red);
}

.modal-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image {
    background: var(--cream);
    border-radius: 8px;
    overflow: hidden;
}

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

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-details h2 {
    color: var(--primary-color);
    margin-top: 1rem;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.8;
}

.modal-specs {
    background: var(--cream);
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.spec-item {
    display: flex;
    gap: 0.5rem;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
}

/* ===========================
   CART PAGE
   =========================== */
.cart-header {
    background: linear-gradient(135deg, var(--accent-color), var(--vintage-green));
    color: var(--cream);
    padding: 2rem 0;
    text-align: center;
}

.cart-header h1 {
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.cart-header p {
    color: var(--cream);
}

.cart-section {
    padding: 3rem 0;
    min-height: 60vh;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-cart h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.empty-cart p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cart Item */
.cart-item {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.cart-item-image {
    background: var(--cream);
    border-radius: 8px;
    overflow: hidden;
}

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

.cart-item-details h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cart-item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.item-category,
.item-era {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.item-category {
    background: var(--accent-color);
    color: var(--cream);
}

.item-era {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.cart-item-description {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 0.95rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.quantity-controls-large {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-controls-large .qty-btn {
    width: 36px;
    height: 36px;
}

.quantity-controls-large .quantity {
    font-size: 1.2rem;
    min-width: 40px;
}

.cart-item-total {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    line-height: 1;
}

.remove-btn:hover {
    color: var(--vintage-red);
    transform: scale(1.2);
}

/* Order Summary */
.order-summary {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-summary h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: none;
    margin-top: 0.5rem;
}

.order-summary .btn-large {
    margin: 1.5rem 0 1rem;
}

.continue-shopping {
    display: block;
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    margin: 1rem 0;
    transition: color 0.3s ease;
}

.continue-shopping:hover {
    color: var(--vintage-red);
}

.clear-cart-form {
    text-align: center;
    margin-top: 1rem;
}

.shipping-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.shipping-info h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.shipping-info ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shipping-info li {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: linear-gradient(135deg, var(--accent-color), var(--text-dark));
    color: var(--cream);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: var(--cream);
    margin-bottom: 0.5rem;
}

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

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

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

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

.footer-bottom p {
    color: var(--cream);
    font-size: 0.9rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 968px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: relative;
        top: 0;
    }

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

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

    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

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

    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .filters-wrapper {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
    }

    .hero {
        padding: 4rem 0;
    }

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

    .product-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-actions {
        width: 100%;
    }

    .quantity-controls {
        justify-content: flex-start;
    }
}
