/* General Styling */
:root {
    --grid-mobile: repeat(2, 1fr); /* 2 columns below 768px */
    --grid-small: repeat(3, 1fr); /* 3 columns above 768px */
    --grid-large: repeat(4, 1fr); /* 4 columns above 992px */
    --aspect-ratio: 0.6666666666666666; /* 2:3 ratio */
    --gap: 2rem; /* Default gap */
    --COLOR-BG: #ffffff;
    --COLOR-BORDER: #ccc;
    --COLOR-TEXT: #333;
    --COLOR-TEXT-LIGHT: #666;
    --COLOR-TEXT-DARK: #000000;
    --footer-height: 80px;
}

body {
    font-family: "Poppins", Arial, sans-serif;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    background-color: #f9f9f9;
    color: var(--COLOR-TEXT);
}

*::before, *::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

main {
    min-height: 100%;
    padding-bottom: var(--footer-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 16px;
    transform: scaleY(0.875) !important;
    transform-origin: top;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #fff5e6, #ffe0b2);
    height: 68.57vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero-content {
    z-index: 1;
    padding: 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--COLOR-TEXT);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--COLOR-TEXT-LIGHT);
    margin-bottom: 2rem;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    opacity: 0.8;
}

.hero-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: #000000 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 0;
    transition: background-color 0.3s;
}

.hero-btn:hover {
    background-color: #a60b00 !important;
}

/* Product Section */
.product-section {
    padding: 0;
}

.product-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: var(--grid-mobile);
    padding: 0;
    margin: 0 auto;
    align-content: start;
}

/* Product Card */
.product-card {
    position: relative;
    background: var(--COLOR-BG);
    border: none;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    margin: 0;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 0;
    padding-top: calc(1 / var(--aspect-ratio) * 100%);
    position: relative;
    overflow: hidden;
    background-color: var(--COLOR-BG);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    display: block;
}

.no-image {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1rem;
    color: #888;
    text-align: center;
    padding: 5%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 0;
}

/* Product Info */
.product-info {
    padding: 0 12px;
    margin-top: 0.3rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    z-index: 10;
    line-height: 1.2;
    text-align: center;
}

.product-title {
    font-size: 1rem;
    margin: 0.2rem;
    color: var(--COLOR-TEXT);
    font-weight: 400;
}

.product-price {
    font-size: 1rem;
    color: #a60b00;
    margin: 0.2rem;
    font-weight: 400;
}

/* Action Buttons */
.action-buttons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.25rem;
}

.details-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none !important;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.details-btn:hover {
    background-color: #f0f0f0;
    color: #000000;
    border-color: #000000;
}

.details-btn:disabled {
    background-color: #ccc;
    color: #666;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: #000000;
    color: #ffffff;
    border-radius: 0;
    border-right: 1px solid #ffffff;
    z-index: 10;
    text-decoration: none;
}

.back-to-top:hover {
    background-color: #a60b00;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --gap: 1rem;
    }
    .container {
        padding: 35px 16px;
    }
    .hero {
        height: 68.57vh;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .hero-content {
        padding: 10px;
    }
    .product-grid {
        grid-template-columns: var(--grid-mobile);
    }
    .product-title {
        font-size: 1rem;
    }
    .product-price {
        font-size: 0.8rem;
    }
    .hero-btn, .details-btn {
        font-size: 0.8rem;
        padding: 0.25rem 1rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 70px 40px;
    }
    .product-grid {
        grid-template-columns: var(--grid-small);
    }
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: var(--grid-large);
    }
}

@media (max-width: 568px) {
    .product-title {
        margin: 0.2rem;
    }
    .product-price {
        margin: 0.2rem;
    }
    .action-buttons {
        margin-bottom: 0.2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .product-title {
        font-size: 0.9rem;
    }
    .product-price {
        font-size: 0.7rem;
    }
    .hero-btn, .details-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }
}