/* style.css */
/* ================================
   Xollent Coffee - Global Styles
   ================================ */

:root {
    /* Color Palette */
    --color-bg-light: #F6EFE8;
    --color-bg-dark: #121212;
    --color-text-dark: #4B3621;
    --color-text-light: #F6EFE8;
    --color-text-muted: #D3BBA3;
    --color-accent-brown: #6F4E37;
    --color-accent-cyan: #00B8C4;
    --color-accent-cyan-dark: #0ABAB5;
    --color-card-bg: #FFFFFF;
    --color-card-shadow: rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Orbitron', sans-serif;

    /* Spacing & Borders */
    --container-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-lg: 12px;
    --border-radius-pill: 50px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Elements */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent-brown);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Typography */
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-text-dark);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    color: var(--color-accent-brown);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    border-radius: var(--border-radius-pill);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-accent-brown);
    color: var(--color-bg-light);
}

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

.btn-secondary {
    background-color: var(--color-bg-light);
    color: var(--color-accent-brown);
    border: 2px solid var(--color-accent-brown);
}

.btn-secondary:hover {
    background-color: var(--color-accent-brown);
    color: var(--color-bg-light);
}

.btn-accent {
    background-color: var(--color-accent-cyan);
    color: var(--color-bg-dark);
}

.btn-accent:hover {
    background-color: var(--color-accent-cyan-dark);
}


/* ================================
   Header & Navigation
   ================================ */
.site-header {
    background-color: var(--color-text-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo img {
    width: 140px;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--color-text-light);
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent-cyan);
    border-bottom-color: var(--color-accent-cyan);
}


/* ================================
   Main Content Sections
   ================================ */

/* Hero Section */
.hero {
    position: relative;
    background-image: url('/images/fuel.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Ensures smoothest scrolling on mobile */
    text-align: center;
    padding: 8rem 1.5rem;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero .hero-title {
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero .hero-subtitle {
    color: var(--color-text-light);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Hero Best Seller Feature */
.hero-bestseller {
    margin: 2.5rem auto;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.bestseller-title {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--color-text-dark);
}

.bestseller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.bestseller-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--color-bg-light);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
}

.bestseller-img {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.bestseller-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.bestseller-info p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.bestseller-info small {
    font-size: 0.8rem;
    color: #888;
    display: block;
}

/* Video Section */
.video-highlight {
    padding: 5rem 0;
    background-color: #fff;
}

.video-highlight video {
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background-color: #fdf7f2;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.7;
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* Products Section */
.products-section {
    padding: 5rem 0;
    background-color: #fff;
}

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

.product-card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px var(--color-card-shadow);
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.product-card img {
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 700;
    color: var(--color-accent-brown);
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes button to bottom */
}

.more-info-link {
    text-align: center;
    margin-top: 3rem;
}

/* Newsletter Section */
.newsletter-section {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: 4rem 1.5rem;
    text-align: center;
}

.newsletter-title {
    font-family: var(--font-display);
    color: var(--color-accent-cyan);
    font-size: 2.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.newsletter-section p {
    margin: 1rem auto 2rem auto;
    max-width: 500px;
}

.form-inputs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-inputs input[type="email"] {
    flex-grow: 1;
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius-pill);
    border: 2px solid var(--color-accent-cyan);
    background-color: #222;
    color: var(--color-text-light);
    font-family: var(--font-primary);
    font-size: 1rem;
}

.form-inputs input[type="email"]::placeholder {
    color: #888;
}

.privacy-note {
    font-size: 0.85rem;
    color: #999;
    margin-top: 1rem !important;
}


/* ================================
   Footer
   ================================ */
.site-footer {
    background-color: var(--color-text-dark);
    color: var(--color-text-light);
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.9rem;
}


/* ================================
   Media Queries for Responsiveness
   ================================ */

/* For TVs and Large Desktops */
@media (min-width: 1600px) {
    html {
        font-size: 18px; /* Increase base font size */
    }

    .hero {
        padding: 10rem 1.5rem;
    }

    .container {
        max-width: 1400px; /* Allow content to spread out more */
    }
}

/* For Tablets (Portrait) and Large Phones */
@media (max-width: 1024px) {
    .hero-content {
        max-width: 90%;
    }

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

/* For most Tablets and smaller devices */
@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .hero .hero-title { font-size: 2.75rem; }

    .main-nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-inputs {
        flex-direction: column;
        gap: 1rem;
    }

    /* This rule fixes the jumbled bestseller layout on tablets and phones */
    .bestseller-grid {
        grid-template-columns: 1fr;
    }
}

/* For Mobile Phones */
@media (max-width: 480px) {
    .hero {
        padding: 6rem 1.5rem;
    }
    .hero .hero-title { font-size: 2.2rem; }
    .hero .hero-subtitle { font-size: 1.1rem; }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .bestseller-card {
        flex-direction: column;
        text-align: center;
    }
}
