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

/* Body and Font Styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* Header Styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px;
    background-color: #333;
    color: #fff;
}

header h1 {
    font-size: 2rem;
}

header nav ul {
    display: flex;
    list-style: none;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}

header nav ul li a:hover {
    color: #ffcc00;
}

/* Hero Section Styling */
.hero {
    background: url('images/hero-hoodie.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero h2 {
    font-size: 3rem;
    animation: fadeIn 2s ease-in-out;
}

.shop-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ffcc00;
    color: #333;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.shop-btn:hover {
    background-color: #fff;
}

/* Products Section Styling */
.products {
    padding: 50px;
    text-align: center;
    background-color: #fff;
}

.products h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.product-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    width: 100%; /* Ensure the card takes full width on small screens */
    max-width: 300px; /* Limit the maximum width */
}

.product-card:hover {
    transform: scale(1.05);
}

.product-card img {
    max-width: 100%;
    border-radius: 8px;
}

.product-card h3 {
    margin: 15px 0;
}

.product-card p {
    font-size: 1.2rem;
    color: #ffcc00;
}

.product-card button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-card button:hover {
    background-color: #ffcc00;
    color: #333;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: #fff;
}

/* Keyframe Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loader Styles */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #333; /* Darker */
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide Loader After Page Loads */
.hide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-out;
}
/* Highlight Section on Scroll */
.highlight {
    animation: bounce 0.5s ease-out;
}

@keyframes bounce {
    0% { transform: translateY(-10px); }
    50% { transform: translateY(5px); }
    100% { transform: translateY(0); }
}
/* Floating Cart Button */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.floating-cart img {
    width: 30px;
    height: 30px;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ffcc00;
    color: #333;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Bounce Animation for Cart */
.bounce {
    animation: bounceCart 0.6s ease-in-out;
}

@keyframes bounceCart {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.logo img {
    width: 10%; /* Reduce the width by 40% */
    height: auto; /* Maintain the aspect ratio */ 
    position: fixed;
    top: 2px;  /* You can adjust this value */
    left: 2px; /* You can adjust this value */
    opacity: 1;  /* Initially hidden */
    transition: opacity 0.3s ease-in-out; /* Smooth transition */
    z-index: 1;  /* Make sure logo stays on top */
    padding: 1px;
}

/* Media queries for responsiveness */

/* Smartphones (portrait) */
@media (max-width: 600px) {
    .product-grid {
        flex-direction: column;
    }

    .product-card {
        flex: 1 1 100%;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* Tablets and small desktops (landscape) */
@media (min-width: 601px) and (max-width: 1024px) {
    .product-card {
        flex: 1 1 calc(50% - 20px);
    }

    header {
        padding: 20px;
    }

    .hero {
        padding: 40px 20px;
    }
}

/* Large desktops and TVs */
@media (min-width: 1025px) {
    .product-card {
        flex: 1 1 calc(33.333% - 20px);
    }

    header {
        padding: 20px 40px;
    }

    .hero {
        padding: 60px 40px;
    }
} 

/* Flip card styles */
.product-card {
    perspective: 1000px;
}

.product-card-inner {
    position: relative;
    width: 100%;
    height: 400px;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.product-card:hover .product-card-inner {
    transform: rotateY(180deg);
}

.product-card-front,
.product-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    padding: 20px;
}

.product-card-back {
    transform: rotateY(180deg);
    background-color: #f8f8f8;
}