/* Professional spacing for policy pages */

.policy-main {
    padding: 60px 24px;
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    font-size: 1.08rem;
    line-height: 1.8;
    color: #333;
}

/* ========================================
   XpressAutos - Main Stylesheet
   ======================================== */

/* === CSS Reset & Base Styles === */

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

:root {
    --primary-red: #d32f2f;
    --dark-red: #b71c1c;
    --black: #111;
    --dark-gray: #222;
    --medium-gray: #666;
    --light-gray: #f5f5f5;
    --white: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--black);
    line-height: 1.6;
    background-color: var(--white);
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* === Typography === */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* === Buttons === */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

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

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

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

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* === Navigation === */

.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Keep header the same visual size while allowing larger logo
       Remove vertical padding and use a fixed header height */
    padding: 0 20px;
    height: 82px;
    /* keeps header size stable */
}

.nav-logo {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
    flex: 0 0 auto;
    max-width: 320px;
    /* prevent the logo container from growing too wide */
}

.nav-logo .logo {
    /* constrain logo to header using max-height and max-width so it never gets clipped */
    height: 150px;
    max-height: calc(100% - 12px);
    /* breathing room */
    max-width: 100%;
    width: auto;
    display: block;
    object-fit: contain;
    transition: max-height 0.18s ease, transform 0.18s ease;
    margin-top: 0px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: var(--black);
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-red);
}

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

.cart-count {
    background-color: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--black);
    transition: all 0.3s ease;
}

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

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

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

/* === Hero Section === */

.hero,
.hero-main {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0 0 L50 50 L0 100 L50 100 L100 50 L50 0 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* === Sections === */

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

.categories-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

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

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

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

.category-icon {
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.category-card h3 {
    margin-bottom: 0.5rem;
    color: var(--black);
}

.category-card p {
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.category-link {
    color: var(--primary-red);
    font-weight: 500;
}

.category-link:hover {
    text-decoration: underline;
}

/* === Features Section === */

.features-section {
    padding: 80px 0;
}

/* === Featured Products === */

.featured-products-section {
    padding: 80px 0;
}

/* === About Page Specific === */

.hero-about {
    position: relative;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.95), rgba(179, 28, 28, 0.95));
    color: var(--white);
    padding: 80px 0 100px;
    overflow: hidden;
}

.hero-about .hero-content {
    text-align: left;
    padding-left: 20px;
}

.hero-about .hero-title {
    font-size: 2.6rem;
}

.hero-about .hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2.5rem;
    align-items: center;
    padding: 60px 0;
}

.about-text h2 {
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stats-section {
    padding: 20px 0 40px;
}

.stats-grid {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.stat-card {
    background: var(--white);
    color: var(--black);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    flex: 1;
}

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

.stat-label {
    color: var(--medium-gray);
}

.values-section {
    padding: 40px 0 80px;
}

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

.value-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.value-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .hero-about .hero-content {
        text-align: center;
    }
}

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

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: white;
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
}

.product-category {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

.product-title {
    font-size: 1.05rem;
    margin: 0;
    color: var(--black);
}

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

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

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

.feature-box {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.feature-box h3 {
    margin-bottom: 0.5rem;
}

.feature-box p {
    color: var(--medium-gray);
}

/* === CTA Section === */

.cta-section {
    padding: 80px 0;
    background-color: var(--light-gray);
    text-align: center;
}

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

.cta-section p {
    font-size: 1.1rem;
    color: var(--medium-gray);
    margin-bottom: 2rem;
}

/* === Footer === */

.footer {
    background-color: #f6f7f8;
    color: var(--black);
    padding: 56px 0 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -2px 24px 0 rgba(0, 0, 0, 0.07);
    margin-top: 48px;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 380px 180px 180px 180px;
    gap: 2rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: var(--black);
    font-size: 1.08rem;
    letter-spacing: 0.01em;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: rgba(0, 0, 0, 0.85);
    transition: color 0.18s, text-decoration 0.18s;
    border-radius: 4px;
    padding: 2px 4px;
}

.footer-col a:hover {
    color: var(--primary-red);
    background: rgba(211, 47, 47, 0.07);
    text-decoration: underline;
}

.footer-col p {
    color: rgba(0, 0, 0, 0.75);
}

/* Star Rating Styles */

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0.5rem 0;
}

.star {
    font-size: 1.1rem;
    line-height: 1;
}

.star-full {
    color: #ffa500;
}

.star-half {
    background: linear-gradient(90deg, #ffa500 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star-empty {
    color: #ddd;
}

.rating-number {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-left: 0.5rem;
}

/* Product Card Star Rating */

.product-card .star-rating {
    margin: 0.25rem 0 0.5rem 0;
}

.product-card .star {
    font-size: 1rem;
}

/* Image Gallery Styles */

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    background-color: white;
}

.thumbnail-images {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-color: white;
}

.thumbnail:hover {
    border-color: var(--primary-red);
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 1px var(--primary-red);
}

/* Image navigation arrows (if multiple images) */

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.image-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.image-nav.prev {
    left: 10px;
}

.image-nav.next {
    right: 10px;
}

.image-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Overlay */

.order-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* darker overlay for focus */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: 'Arial', sans-serif;
    /* match your site’s form font */
}

/* Popup box */

.order-popup-content {
    background: #ffffff;
    padding: 25px 35px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 90%;
    animation: popupFadeIn 0.3s ease-out;
    border-top: 4px solid #c62828;
    /* red accent bar to match your button */
}

/* Message text */

.order-popup-content p {
    font-size: 15px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Button */

.order-popup-content button {
    background: #c62828;
    /* same red as your PLACE ORDER button */
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.order-popup-content button:hover {
    background: #a71f1f;
    /* darker red on hover */
}

/* Hidden state */

.hidden {
    display: none;
}

/* Animation */

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

/* Image counter */

.image-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    z-index: 10;
}

/* Responsive adjustments */

@media (max-width: 768px) {
    .main-image-container {
        height: 300px;
    }
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    .star {
        font-size: 0.95rem;
    }
}

/* first column (logo + blurb) */

.footer-col.footer-about {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.newcol {
    margin-top: 2rem;
}

.footer-col.footer-about img,
.footer-col.footer-about .logo,
.footer-logo {
    width: 188px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
}

.footer-col.footer-about p {
    max-width: 240px;
    color: rgba(0, 0, 0, 0.75);
}

/* vertical divider between about and contact */

.footer-grid>.footer-col:nth-child(2) {
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    padding-left: 22px;
}

/* contact / need help styling (second column) */

.footer-grid .contact-info {
    color: rgba(0, 0, 0, 0.9);
}

.footer-grid .contact-info a {
    color: rgba(0, 0, 0, 0.9);
    font-weight: 600;
}

.footer-grid .contact-info {
    display: block;
}

/* stats/promo row look (simulated) */

.footer-promo {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 1rem;
    padding: 14px 0;
    margin: 18px 0;
    background: linear-gradient(90deg, #f6f7f8 80%, #fbe9e7 100%);
}

.footer-promo .promo-item {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 18px;
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.97rem;
    border-radius: 0 0 12px 12px;
}

.footer-bottom .footer-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.footer-bottom .footer-links .copyright,
.footer-bottom .footer-links .footer-nav {
    width: 100%;
    text-align: center;
    margin: 0 auto;
    display: block;
}

.footer-bottom .footer-links .footer-nav a {
    display: inline-block;
    margin: 0 0.5em;
    text-align: center;
}

.footer-bottom .payments {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.07);
    padding: 4px 12px;
}

@media (max-width: 900px) {
    .footer {
        border-radius: 0;
        margin-top: 32px;
        box-shadow: none;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-grid>.footer-col:nth-child(2) {
        border-left: none;
        padding-left: 0;
    }
    .footer-promo {
        flex-direction: column;
        gap: 6px;
        background: #f6f7f8;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        border-radius: 0 0 8px 8px;
    }
    .footer-bottom .footer-links {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    .footer-bottom .footer-links .copyright,
    .footer-bottom .footer-links .footer-nav {
        width: 100%;
        text-align: center;
        margin: 0 auto;
        display: block;
    }
    .footer-bottom .footer-links .footer-nav a {
        display: inline-block;
        margin: 0 0.5em;
        text-align: center;
    }
    .footer-bottom .payments {
        margin-top: 8px;
    }
}

/* === Popup Notification === */

.popup {
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1200;
}

.popup.show {
    opacity: 1;
    transform: translateY(0);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-buttons button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#confirmRemove {
    background-color: #e74c3c;
    color: white;
}

#cancelRemove {
    background-color: #bdc3c7;
    color: black;
}

/* === Responsive / Mobile === */

@media (max-width: 900px) {
    .nav-menu {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 260px;
        background: var(--white);
        flex-direction: column;
        padding: 4rem 1.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-hover);
        gap: 1rem;
    }
    .nav-menu.active {
        transform: translateX(0);
    }
    .nav-toggle {
        display: flex;
    }
    .nav-container {
        padding: 0 20px;
        height: 72px;
    }
    /* Logo fills most of the header height on tablets */
    .nav-logo .logo {
        max-height: calc(100% - 8px);
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 140px;
    }
    .hero {
        height: 420px;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    /* Mobile logo size to avoid crowding */
    .nav-container {
        height: 64px;
    }
    .nav-logo {
        max-width: 220px;
    }
    .nav-logo .logo {
        max-height: calc(100% - 6px);
    }
}

/* === Shop Page === */

.shop-header {
    padding: 40px 0;
    background-color: var(--light-gray);
    text-align: center;
}

.shop-container {
    display: flex;
    gap: 2rem;
    padding: 60px 0;
}

.sidebar {
    flex: 0 0 250px;
}

.filter-section {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.filter-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
    cursor: pointer;
}

.products-container {
    flex: 1;
}

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

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

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

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.product-category {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* === Product Detail Page === */

.product-detail {
    padding: 60px 0;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    background-color: white;
}

.thumbnail-images {
    display: flex;
    gap: 1rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-red);
}

.product-details h1 {
    margin-bottom: 1rem;
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

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

.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.quantity-selector input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

/* === Cart Page === */

.cart-page {
    padding: 60px 0;
    min-height: 60vh;
}

.cart-header {
    padding: 40px 0;
    background-color: var(--light-gray);
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-items {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background-color: var(--light-gray);
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-category {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

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

.quantity-input {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.remove-btn {
    background-color: transparent;
    color: var(--primary-red);
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.remove-btn:hover {
    text-decoration: underline;
}

.cart-summary {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

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

.empty-cart {
    text-align: center;
    padding: 4rem 0;
}

.empty-cart h2 {
    margin-bottom: 1rem;
}

.empty-cart p {
    color: var(--medium-gray);
    margin-bottom: 2rem;
}

/* === Checkout Page === */

.checkout-page {
    padding: 60px 0;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.checkout-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-summary {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: fit-content;
}

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

.order-item:last-of-type {
    border-bottom: 2px solid var(--border-color);
}

.payment-notice {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 1.5rem;
    text-align: center;
}

/* === About Page === */

.about-header {
    padding: 60px 0;
    background-color: var(--light-gray);
    text-align: center;
}

.about-content {
    padding: 80px 0;
}

.about-section {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.about-section h2 {
    margin-bottom: 1.5rem;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

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

.value-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.value-icon {
    color: var(--primary-red);
    margin-bottom: 1rem;
}

/* === Contact Page === */

.contact-header {
    padding: 60px 0;
    background-color: var(--light-gray);
    text-align: center;
}

.contact-content {
    padding: 80px 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    color: var(--primary-red);
    flex-shrink: 0;
}

.contact-form-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
}

.success-message.show {
    display: block;
}

/* Simple popup style */

.popup {
    position: fixed;
    top: 20px;
    right: -300px;
    /* start off-screen */
    background: #4caf50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease, right 0.3s ease;
    z-index: 9999;
}

.popup.show {
    opacity: 1;
    right: 20px;
    /* slide into view */
}

/* === Responsive Design === */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .product-detail-container,
    .checkout-container,
    .contact-container {
        grid-template-columns: 1fr;
    }
    .cart-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .hero {
        height: 400px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .categories-grid,
    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    .shop-container {
        flex-direction: column;
    }
    .sidebar {
        flex: 1;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .hero {
        height: 350px;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .btn-lg {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .product-card {
        margin-bottom: 1rem;
    }
    .cart-item {
        flex-direction: column;
    }
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
}

/* ==========================================
   MOBILE-ONLY NAVIGATION STYLES
   ========================================== */

/* Mobile Hamburger Icon - Hidden on Desktop */
.mobile-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--black);
    transition: all 0.3s ease;
}

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

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

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

/* Mobile Cart Icon - Hidden on Desktop */
.mobile-cart-icon {
    display: none;
    position: relative;
    align-items: center;
    color: var(--black);
}

.mobile-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    display: none;
}

.mobile-cart-count.show {
    display: block;
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    left: 0;
}

/* Sidebar Header */
.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-gray);
}

.sidebar-logo {
    height: 40px;
    width: auto;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--black);
}

.mobile-sidebar-close:hover {
    color: var(--primary-red);
}

/* Sidebar Content */
.mobile-sidebar-content {
    padding-bottom: 0px; /* Space for bottom nav */
}

/* Mobile Menu */
.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu > li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu > li > a,
.mobile-menu > li > button {
    display: block;
    padding: 15px 20px;
    color: var(--black);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.mobile-menu > li > a:hover,
.mobile-menu > li > button:hover {
    background: var(--light-gray);
}

/* Dropdown Toggle */
.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--light-gray);
    transition: max-height 0.3s ease;
}

.dropdown-menu.active {
    max-height: 500px;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: var(--medium-gray);
    font-size: 0.95rem;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-red);
}

/* Category Menu */
.mobile-category-menu {
    padding: 20px 0;
}

.mobile-category-menu h4 {
    padding: 0 20px 10px;
    margin: 0;
    color: var(--black);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-group {
    border-bottom: 1px solid var(--border-color);
}

.category-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: none;
    border: none;
    color: var(--black);
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    text-align: left;
}

.category-toggle:hover {
    background: var(--light-gray);
}

.category-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.category-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--light-gray);
    transition: max-height 0.3s ease;
}

.category-submenu.active {
    max-height: 600px;
}

.category-submenu li a {
    display: block;
    padding: 10px 20px 10px 40px;
    color: var(--medium-gray);
    font-size: 0.9rem;
    text-decoration: none;
}

.category-submenu li a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-red);
}

/* Direct Category Links */
.category-direct-links {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.category-direct-links li {
    border-bottom: 1px solid var(--border-color);
}

.category-direct-links li a {
    display: block;
    padding: 15px 20px;
    color: var(--black);
    font-weight: 500;
    text-decoration: none;
}

.category-direct-links li a:hover {
    background: var(--light-gray);
}

/* Sidebar Footer */
.mobile-sidebar-footer {
    border-top: 2px solid var(--border-color);
    padding: 20px;
    background: var(--light-gray);
}

.sidebar-contact p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--black);
}

.sidebar-contact a {
    color: var(--primary-red);
    text-decoration: none;
}

.sidebar-contact a:hover {
    text-decoration: underline;
}

.contact-note {
    font-size: 0.85rem;
    color: var(--medium-gray);
    line-height: 1.4;
}

.sidebar-copyright {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.sidebar-copyright p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--medium-gray);
    text-align: center;
}

/* Fixed Bottom Mobile Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1998;
    padding: 8px 0;
}

.mobile-bottom-nav {
    display: none;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 0.75rem;
    position: relative;
    transition: color 0.2s;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-red);
}

.bottom-nav-item svg {
    margin-bottom: 4px;
}

.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    display: none;
}

.bottom-nav-badge.show {
    display: block;
}

/* ==========================================
   MOBILE-SPECIFIC MEDIA QUERIES
   ========================================== */

@media (max-width: 768px) {
    /* Show mobile hamburger and cart icon */
    .mobile-hamburger {
        display: flex;
    }
    
    .mobile-cart-icon {
        display: flex;
    }
    
    /* Hide desktop toggle on mobile */
    .nav-toggle {
        display: none;
    }
    
    /* Adjust nav container for mobile elements */
    .nav-container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: px;
    }
    
    .nav-logo {
        height: 48px;
        justify-self: center;
    }
    
    /* Show bottom navigation on mobile */
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Add padding to body to account for bottom nav */
    body {
        padding-bottom: 60px;
    }
    
    /* Adjust footer to account for bottom nav */
    .footer {
       
    }
}

@media (max-width: 480px) {
    /* Narrower sidebar on very small screens */
    .mobile-sidebar {
        width: 280px;
        left: -280px;
    }
    
    .bottom-nav-item {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .bottom-nav-item svg {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================
   MOBILE PRODUCT GRID ADJUSTMENTS
   ========================================== */

/* Target all product grids on mobile */
@media (max-width: 768px) {
    /* Force 2-column layout for ALL product grids on mobile */
    .products-grid,
    .featured-products-section .products-grid,
    .products-container .products-grid,
    #productsGrid,
    #featuredProducts {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    /* Adjust product card for mobile 2-column layout */
    .product-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-title {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }
    
    .product-category {
        font-size: 0.8rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    /* Stack action buttons vertically on mobile */
    .product-actions {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .product-actions .btn-sm,
    .product-actions .btn {
        width: 100%;
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    /* Narrower sidebar on very small screens */
    .mobile-sidebar {
        width: 280px;
        left: -280px;
    }
    
    .bottom-nav-item {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .bottom-nav-item svg {
        width: 20px;
        height: 20px;
    }
    
    /* Tighter spacing for 2-column grid on small phones */
    .products-grid,
    .featured-products-section .products-grid,
    .products-container .products-grid,
    #productsGrid,
    #featuredProducts {
        gap: 0.75rem !important;
    }
    
    .product-info {
        padding: 0.5rem;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
}