/* Global Styles */
html{
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Impact", sans-serif;
    color: #ffffff;
    box-sizing: border-box;
    text-align: center;
    overflow-x: hidden;
    background: #00fbff22;
}

*, *::before, *::after {
    box-sizing: border-box;
}

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

/* Header / Navigation */
.top-nav{
    width: 100%;
    height: 2em;
    background: #aca9ff;
    box-sizing: border-box;
}

.main-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 1rem 0;
    box-sizing: border-box;
    box-shadow: 0 2px 4px #aca9ff;
}

.logo{
    margin-left: clamp(1rem, 4vw, 4%);
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    letter-spacing: -0.1rem;
    color: #aca9ff;
    text-decoration: none;
    position: sticky;
    transition: transform 0.3s ease, color 0.3s ease;
}

.logo:hover{
    color: #ff66d9;
    transform: rotate(-3deg) scale(1.05);
}

.logo span{
    color: #ff66d9;
}

.logo:hover span{
    color: #aca9ff;
}

.main-nav{
    display: flex;
    gap: 1rem;
    margin-right: clamp(1rem, 4vw, 4%);
}

.main-nav i{
    font-size: 1rem;
    color: #aca9ff;
    transition: transform 0.3s ease, color 0.3s ease;
}

.main-nav i:hover{
    color: #ff66d9;
    transform: translateY(-2px);
}

/* Hero Section */
.main-page{
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
}

.main-page-img{
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("public/frog.jpg");
    background-size: cover;
    background-position: center;
    width: 100%;
    max-width: 90rem;
    min-height: 28rem;
    height: min(90vh, 42rem);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    box-sizing: border-box;
}

#main-page-text{
    color: #aca9ff;
    margin: 0 0 1rem;
    font-size: clamp(2rem, 6vw, 5rem);
    line-height: 1.2;
    max-width: 700px;
}

.shop-now{
    font-family: "Impact", sans-serif;
    font-size: 1rem;
    color: #00d9ffb0;
    background-color: transparent;
    border: 2px solid #aca9ff;
    border-radius: 0.5rem;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-now:hover{
    background-color: #aca9ff;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Products Section */
.items-page{
    padding: 2rem 1rem 3rem;
}

.items-header{
    font-size: clamp(1.1rem, 3vw, 1.7rem);
    letter-spacing: 5px;
    text-align: center;
    color: #aca9ff;
    text-shadow: 2px 2px 6px rgba(255, 102, 217, 0.4);
    margin-bottom: 0;
}

.products-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    align-items: stretch;
}

.product{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    margin: 0 auto;
    padding: 0.75rem;
    box-sizing: border-box;
    position: relative;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    background-color: #aca9ff42;
}

.product img,
.product-image-container img{
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 0.75rem;
}

.product-image-container{
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
}

.product-link{
    text-decoration: none;
    color: inherit;
}

.product-info {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    justify-content: flex-end;
}

.product-info p {
    margin: 0;
    color: #aca9ff;
}

.add-to-cart {
    font-family: "Impact", sans-serif;
    display: none;
    background-color: #aca9ff;
    border-radius: 1rem;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 1rem;
    margin-top: 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
}

.product:hover .add-to-cart {
    display: block;
}

.overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: .5s ease;
    background-color: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-family: 'Proxima Nova', sans-serif;
    text-align: center;
    padding: 1rem;
    box-sizing: border-box;
}

.product-image-container:hover .overlay {
    opacity: 1;
}

/* Instagram Section */
.instagram-section {
    padding: 50px 0;
}

.instagram-section h2 {
    color: #aca9ff;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 6px rgba(255, 102, 217, 0.4);
}

.instagram-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: stretch;
}

.instagram-photo {
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.instagram-photo a {
    display: block;
    width: 100%;
    height: 100%;
}

.instagram-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instagram-photo:hover img {
    transform: scale(1.05);
}

/* Footer */
.footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -4px 8px rgba(172, 169, 255, 0.4);
}

.footer-social {
    margin: 0;
}

.footer-social a {
    margin: 0 10px;
    color: #aca9ff;
    text-decoration: none;
    font-size: 20px;
}

.footer-bottom {
    background-color: #aca9ff;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 12px;
}

/* Responsive Styles */
@media (min-width: 1024px) {
    .instagram-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: minmax(180px, 1fr);
    }

    .instagram-photo:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .instagram-photo:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .instagram-photo:nth-child(3) {
        grid-column: span 1;
        grid-row: span 2;
    }

    .instagram-photo:nth-child(4) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .instagram-photo:nth-child(5) {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 900px) {
    .instagram-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 180px;
    }

    .instagram-photo:nth-child(1),
    .instagram-photo:nth-child(4) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .instagram-photo:nth-child(2),
    .instagram-photo:nth-child(3),
    .instagram-photo:nth-child(5) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .main-header {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 1rem;
    }

    .logo {
        margin: 0;
    }

    .main-nav {
        margin: 0;
        margin-left: auto;
    }

    .main-page {
        min-height: auto;
        padding: 1rem;
    }

    .main-page-img {
        min-height: 24rem;
        height: auto;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .instagram-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .instagram-photo:nth-child(1),
    .instagram-photo:nth-child(2),
    .instagram-photo:nth-child(3),
    .instagram-photo:nth-child(4),
    .instagram-photo:nth-child(5) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .main-page-img {
        min-height: 20rem;
        padding: 1.5rem;
    }

    .shop-now {
        padding: 0.75rem 1rem;
    }

    .items-page {
        padding: 1.5rem 1rem 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-social a {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        gap: 8px;
        grid-auto-rows: 180px;
    }

    .main-header {
        padding: 0.8rem 0.75rem;
    }

    .main-nav {
        gap: 0.75rem;
    }

    .main-nav i {
        font-size: 0.95rem;
    }

    .instagram-section {
        padding: 30px 0;
    }

    .footer-bottom {
        padding: 10px 0.75rem;
    }
}

@media (hover: none) {
    .add-to-cart {
        display: block;
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }
}