@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
* {
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    min-width: 320px;
    width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* navbar */
.navbar {
    width: 100%;
    height: 12rem;
    background-color: #ccffff;
    display: flex;
    color: black;
    align-items: center;
    justify-content: flex-start; /* Changed from space-between to flex-start */
    padding: 0 2rem 0 1rem; /* Reduced right padding, reduced left padding */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    max-width: 100%;
    overflow: visible; /* Changed from overflow-x: hidden to ensure cart is visible */
    gap: 1.5rem; /* Add gap between elements */
}

.logo {
    height: 8rem;
}

.logo:hover {
    opacity: 0.8;
}

.navbar_p {
    font-size: 1.2rem;
    margin-left: 0; /* Ensure no left margin */
    flex: 1; /* Take available space */
}

.navbar_links {
    display: flex;
    gap: 2rem;
    margin-left: 0; /* Ensure no left margin */
    margin-right: auto; /* Push to the left */
}

.navbar_links li a {
    font-size: 1.2rem;
    font-weight: 500;
    position: relative;
}

.navbar_links li a:hover {
    color: #007bff;
}

.navbar_links li a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: width .3s;
}

.navbar_links li a:hover::after {
    width: 100%;
}

.fa-cart-shopping {
    font-size: 2rem;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.fa-cart-shopping:hover {
    color: #007bff;
}

/* Cart icon badge */
.fa-cart-shopping {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
}

/* Hamburger menu styles */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
    background: none;
    border: none;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
    transition: all 0.3s ease-in-out;
}

/* Mobile menu styles - universal approach */
@media screen and (max-width: 600px) {
    .navbar {
        height: auto;
        min-height: 8rem;
        padding: 1rem 1.5rem 1rem 0.5rem; /* Reduced left padding */
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .logo {
        height: 6rem;
        margin-right: 10px;
        margin-left: 0; /* Ensure no left margin */
    }

    .navbar_p {
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
        order: 2;
    }

    .menu-btn {
        display: flex;
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        padding: 10px;
    }

    .navbar_links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ccffff;
        padding: 15px 0;
        flex-direction: column;
        align-items: center;
        z-index: 1002; /* Higher z-index to ensure it's above everything */
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        margin-top: 5px; /* Add space between navbar and dropdown */
        max-width: 100%;
    }

    .navbar_links li {
        margin: 8px 0;
        width: 100%;
        text-align: center;
    }

    .navbar_links li a {
        display: block;
        padding: 10px 0;
        font-size: 1.1rem;
        font-weight: 500;
    }

    .fa-cart-shopping {
        position: absolute;
        right: 23px; /* Moved 8px further to the right */
        top: 50%;
        transform: translateY(-50%);
        z-index: 1000;
        font-size: 1.5rem;
    }
}

/* Additional adjustments for very small screens */
@media screen and (max-width: 360px) {
    /* Ensure no content is cut off */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    .navbar {
        padding: 0.5rem 1.5rem 0.5rem 0.2rem; /* Reduced left padding */
        min-height: 7rem;
    }

    .logo {
        height: 4.5rem;
        margin-right: 5px;
        margin-left: 0; /* Ensure no left margin */
    }

    .navbar_p {
        font-size: 0.75rem;
        width: 100%;
        padding: 0 5px;
    }

    .menu-btn {
        right: 32px; /* Move further to the left */
        transform: scale(0.9) translateY(-50%);
    }

    .fa-cart-shopping {
        right: 8px; /* Move further to the left to prevent being cut off */
        font-size: 1.3rem;
        padding-right: 0; /* Ensure no right padding */
    }

    /* Ensure content doesn't overflow */
    body, html {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Ultra-narrow screens (344px width) */
@media screen and (max-width: 344px) {
    .navbar {
        padding: 0.5rem 1rem 0.5rem 0.2rem;
        overflow: visible; /* Ensure cart icon is visible */
        position: relative;
    }

    .menu-btn {
        right: 28px;
        transform: scale(0.85) translateY(-50%);
    }

    .fa-cart-shopping {
        right: 5px;
        font-size: 1.2rem;
        position: absolute;
        z-index: 1005; /* Ensure it's above everything */
    }

    /* Ensure the cart badge is visible */
    .cart-count {
        right: -5px;
        top: -5px;
        padding: 1px 4px;
        font-size: 10px;
    }
}

/* Medium-small screens */
@media screen and (max-width: 480px) {
    .navbar_p {
        font-size: 0.9rem;
    }

    .navbar_links li a {
        font-size: 1rem;
    }

    /* Ensure content fits */
    .navbar {
        padding: 0.8rem;
    }

    .menu-btn {
        right: 45px;
    }

    .fa-cart-shopping {
        right: 18px;
    }
}

/* Galaxy-specific adjustments */
@media screen and (min-width: 361px) and (max-width: 420px) {
    body, html {
        max-width: 100%;
        overflow-x: hidden;
    }

    .navbar {
        padding: 0.7rem 1.5rem 0.7rem 0.3rem; /* Reduced left padding */
    }

    .logo {
        height: 5rem;
    }

    .navbar_p {
        font-size: 0.8rem;
        padding: 0 5px;
    }

    .menu-btn {
        right: 42px;
    }

    .fa-cart-shopping {
        right: 16px;
        font-size: 1.4rem;
    }
}

/* Product Grid Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Changed to exactly 4 columns */
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px; /* Added to ensure consistent width */
    margin: 0 auto; /* Center the grid */
    position: relative;
    z-index: 1; /* Lower z-index than the menu */
}

/* Add responsive breakpoints */
@media screen and (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Card */
.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    height: auto; /* Changed from 100% to auto */
}

/* Product Image */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 124.89%; /* This is (552/442 * 100) to maintain 442x552 aspect ratio */
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain to prevent cropping */
    background-color: #fff; /* Optional: adds a white background */
}

.product-details {
    flex: 1;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    margin-top: auto;
}

.enlarge-image {
    width: 100%;
    background-color: #f0f0f0;
    border: none;
    padding: 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.enlarge-image:hover {
    background-color: #e0e0e0;
}

/* Modal styles update */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.modal-content img {
    max-width: 442px;
    max-height: 552px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Responsive adjustments */
@media screen and (max-width: 500px) {
    .modal-content img {
        max-width: 100%;
        max-height: 80vh;
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
}

.close-modal:hover {
    color: #ff4444;
}

#paypal-button-container {
    max-width: 750px;
    margin: 20px auto;
}

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

.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cart-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.checkout-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.checkout-button:hover {
    background-color: #0056b3;
}

.footer, p {
    text-align: center;
    padding: 1rem;
    background-color: #ccffff;
    margin-top: 2rem;
}

.add-to-cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    animation: slideIn 0.5s ease-out;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* Custom Orders Page Styles */
.custom-orders-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.custom-orders-content {
    margin-bottom: 3rem;
}

.custom-orders-content h1 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.custom-orders-text {
    background-color: #f5f5f5;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.custom-orders-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #444;
}

.email-link-container {
    text-align: center;
    margin: 2rem 0;
}

.email-link {
    display: inline-flex;
    align-items: center;
    background-color: #ccffff;
    color: #333;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.email-link:hover {
    background-color: #b3ffff;
}

.email-link i {
    margin-right: 10px;
}

.email-instructions {
    font-weight: 500;
    margin-top: 2rem;
}

.email-checklist {
    list-style: disc;
    margin-left: 2rem;
    margin-top: 1rem;
}

.email-checklist li {
    margin-bottom: 0.5rem;
    color: #444;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .custom-orders-container {
        padding: 0 1rem;
    }

    .email-link {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Print styles */
@media print {
    .navbar,
    .button-group,
    .menu-btn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Loading optimization */
.product-image img {
    content-visibility: auto;
}

/* Reduce CLS */
.product-image {
    min-height: 200px;
    background: #f0f0f0;
}
