/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background: #000000;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
}

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

.nav-menu a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #d4a017;
}

#cart-link {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
    margin-left: 2.5rem;
}

#cart-link:hover {
    color: #d4a017;
}

#cart-count {
    color: #1376af; /* Light blue for cart count */
}

/* Main content */
main {
    flex: 1 0 auto;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

#hero {
    background: #000000;
    color: #1376af; /* Light blue offset color for hero titles */
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    border-radius: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-in;
}

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

.hero-content h1 {
    font-size: 2rem; /* Smaller, balanced size for "Welcome to our shop!" */
    margin-bottom: 2rem;
    color: #ffffff; /* White text for the title */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-columns {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-column {
    flex: 1;
    min-width: 250px;
    text-align: center;
    padding: 1rem;
}

.hero-column h2 {
    font-size: 1.8rem;
    color: #1376af; /* Light blue for titles */
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-column p {
    font-size: 1.1rem;
    color: #ffffff; /* White text for descriptions */
    line-height: 1.8;
    max-width: 100%;
}

#sort {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-radius: 0;
    box-shadow: none;
}

.sort-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

#sort-filter {
    padding: 0.5rem 1rem;
    border: 1px solid #444444;
    border-radius: 5px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
    width: 180px;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

#sort-filter:hover {
    border-color: #d4a017;
    background: #2a2a2a;
}

#product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Larger cards */
    gap: 2.5rem;
    padding: 1rem 0;
}

/* Fix product container to prevent stretching */
.product {
    background: #000000; /* Black background */
    text-align: left; /* Align text properly */
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 400px; /* Keeps products uniform */
    padding-bottom: 1rem; /* Adds spacing under product */
}

/* Fix product image container */
.product-images {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    position: relative;
}

.product-images img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fits properly */
}

/* Fix the next button placement */
.next-btn {
    position: absolute;
    bottom: 10px; /* Keeps it inside the image */
    right: 10px;
    background: #d4a017;
    color: #ffffff;
    border: none;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    border-radius: 5px;
    z-index: 2;
}

.next-btn:hover {
    background: #107fb3; /* Slightly darker blue for hover to complement #1376af */
}

/* Fix content alignment */
.product-content {
    padding: 1rem;
    width: 100%;
}

.product h3 {
    font-size: 1.2rem;
    color: #ffffff; /* White for product names */
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.product-price {
    font-size: 1.3rem;
    color: #ffffff; /* White for prices */
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* Fix button alignment */
.product button {
    background: #1376af; /* Light blue for buttons */
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
    width: auto;
    display: inline-block; /* Ensures the button stays inline */
    margin-top: 0.5rem;
    padding: 8px 16px; /* Makes it a better size */
}

.product button:hover {
    background: #005cb3; /* Darker blue for hover to complement #1376af */
}

/* Fix out of stock button */
.product button[disabled] {
    background: #ff4d4d;
    color: #ffffff; /* White for disabled button text */
    cursor: not-allowed;
    opacity: 0.8;
}

.product button[disabled]:hover {
    background: #ff4d4d;
}

/* Popup Styles (Shared for Cart, Privacy, and Terms) */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

#cart-popup,
#privacy-popup,
#terms-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222222;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 90%;
    max-width: 600px; /* Slightly wider for policy content */
    max-height: 80vh; /* Limit height for scrollability */
    overflow-y: auto; /* Enable scrolling for long content */
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.popup-header h2 {
    font-size: 1.8rem;
    color: #1376af; /* Light blue for popup titles */
    font-weight: 700;
}

.close-btn {
    background: #b0b0b0;
    color: #ffffff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.close-btn:hover {
    background: #888888;
}

#cart-summary {
    margin-bottom: 1.5rem;
}

#cart-items {
    list-style: none;
    margin-bottom: 1rem;
}

#cart-items li {
    font-size: 1.1rem;
    color: #1376af; /* Light blue offset color for cart items */
    margin-bottom: 0.5rem;
}

#cart-summary p {
    font-size: 1.1rem;
    color: #1376af; /* Light blue offset color for cart summary */
    margin-bottom: 0.5rem;
}

#cart-total {
    font-size: 1.3rem;
    color: #1376af; /* Light blue for total to maintain consistency */
    font-weight: 600;
}

#address-form input {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #444444;
    border-radius: 5px;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 1rem;
}

#address-form button {
    background: #1376af; /* Light blue for address form button */
    color: #ffffff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
}

#address-form button:hover {
    background: #005cb3; /* Darker blue for hover to complement #1376af */
}

/* Policy Popup Content */
.policy-content {
    font-size: 1rem;
    color: #e0e0e0; /* Light grey for policy text */
    line-height: 1.8;
}

.policy-content h3 {
    font-size: 1.3rem;
    color: #ffffff; /* White for headings */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.policy-content p {
    margin-bottom: 1rem;
}

.policy-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-content ul li {
    margin-bottom: 0.5rem;
}

.policy-content code {
    background: #333333;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    color: #d4a017; /* Gold for email addresses */
}

.policy-content a {
    color: #1376af; /* Light blue for links */
    text-decoration: underline;
}

.policy-content a:hover {
    color: #005cb3; /* Darker blue for hover */
}

/* Contact Form Styles */
#contact {
    background: #1a1a1a;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.contact-text {
    font-size: 1.1rem;
    color: #1376af; /* Light blue offset color for contact text */
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

#contact-form input,
#contact-form textarea {
    padding: 0.6rem;
    border: 1px solid #444444;
    border-radius: 5px;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 1rem;
    resize: vertical;
}

#contact-form textarea {
    min-height: 120px;
}

#contact-form button {
    background: #1376af; /* Light blue for contact form button */
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

#contact-form button:hover {
    background: #005cb3; /* Darker blue for hover to complement #1376af */
}

/* About Section */
#about {
    background: #1a1a1a;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#about h2 {
    font-size: 1.8rem;
    color: #1376af; /* Light blue for about title */
    margin-bottom: 1.5rem;
    font-weight: 700;
}

#about p {
    font-size: 1.1rem;
    color: #ffffff; /* White for about text */
    line-height: 1.8;
}

/* Footer */
footer {
    background: #000000;
    color: #b0b0b0;
    padding: 1.5rem 2rem;
    flex-shrink: 0;
    border-top: 1px solid #444444;
}

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

.copyright {
    font-size: 0.9rem;
    color: #1376af; /* Light blue offset color for copyright */
    margin: 0;
}

.social-section {
    text-align: center;
}

.social-text {
    font-size: 1rem;
    color: #1376af; /* Light blue offset color for social text */
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    color: #1376af; /* Light blue for social links */
    font-size: 1.5rem; /* Larger icons for premium feel */
    transition: color 0.3s;
}

.social-links a:hover {
    color: #005cb3; /* Darker blue for hover to complement #1376af */
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #1376af; /* Light blue offset color for footer links */
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #005cb3; /* Darker blue for hover to complement #1376af */
}

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

/* Responsive Design */
@media (min-width: 600px) {
    #product-list {
        grid-template-columns: repeat(2, 1fr);
    }

    #cart-popup,
    #privacy-popup,
    #terms-popup {
        width: 80%;
        max-width: 600px;
    }

    .footer-content {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .hero-columns {
        flex-wrap: nowrap;
    }
}

@media (min-width: 900px) {
    #product-list {
        grid-template-columns: repeat(3, 1fr);
    }

    header {
        padding: 2rem 4rem;
    }

    .logo {
        height: 70px;
    }

    #hero {
        padding: 5rem 3rem;
    }

    .hero-content h1 {
        font-size: 2.5rem; /* Slightly larger on desktop for balance */
    }

    #cart-popup,
    #privacy-popup,
    #terms-popup {
        max-width: 700px;
    }

    .sort-container {
        justify-content: flex-end;
    }

    .hero-columns {
        gap: 4rem;
    }
}