main{
    background-color: #f2f2f2;
}

.product-page {
    /* width: min(1200px, 98%); */
    width:98%;
    margin: 0 auto;
    padding:2rem 0;
    background-color: #f2f2f2;
}

.product-head {
    text-align: center;
    margin-bottom: 2rem;
}

.product-head h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.75rem);
    color: #222;
}

.product-head p {
    max-width: 760px;
    color: #444;
    margin: 1rem auto 0;
    line-height: 1.75;
    font-size: 1rem;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.product-card {
    width: min(280px, 100%);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.1);
}

.product-card a {
    color: inherit;
    display: block;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 1rem 1rem 1.25rem;
}

.product-info h3 {
    margin: 0 0 0.65rem;
    font-size: 1.15rem;
    color: #222;
}

.product-info .product-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #d64545;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-info .product-link::after {
    content: '→';
}

@media (max-width: 768px) {
    .product-grid {
        gap: 1rem;
    }

    .product-card {
        width: 100%;
    }

    .product-card img {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .product-head h2 {
        font-size: 2rem;
    }

    .product-info {
        padding: 0.95rem 0.95rem 1rem;
    }

    .product-info .product-link {
        font-size: 0.9rem;
    }
}

.product-detail-page {
    width: min(1200px, 95%);
    margin: 0 auto;
    padding: 2rem 0;
    background-color: #f2f2f2;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(280px, 1.35fr) minmax(280px, 1fr);
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.detail-gallery-container {
    position: relative;
}

.detail-gallery {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    border-radius: 18px;
    background: #f5f5f5;
}

.detail-gallery img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.detail-gallery img.active {
    opacity: 1;
}

.gallery-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.gallery-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(220, 70, 70, 0.85);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.gallery-btn:hover {
    background-color: #d64545;
    transform: scale(1.08);
}

.gallery-btn:active {
    transform: scale(0.95);
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-content h1 {
    margin: 0;
    font-size: clamp(2.25rem, 3vw, 3.2rem);
    color: #222;
}

.detail-content p {
    margin: 0;
    color: #444;
    line-height: 1.8;
    font-size: 1rem;
}

.detail-info {
    background: #f2f2f2;
    border-radius: 18px;
    padding: 1.5rem;
}

.detail-info h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: #222;
}

.detail-info ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #444;
    line-height: 1.9;
}

.detail-info li {
    margin-bottom: 0.65rem;
}

.detail-error {
    color: #b22222;
    margin-top: 1rem;
}

.features{
    display: block;
}

.hide {
    display: none;
}

@media (max-width: 900px) {
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-gallery {
        height: 340px;
    }
}

@media (max-width: 576px) {
    .detail-hero {
        gap: 1.5rem;
    }

    .detail-content h1 {
        font-size: 2rem;
    }

    .detail-gallery {
        height: 280px;
    }

    .gallery-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .detail-info {
        padding: 1.25rem;
    }
}