/* store-test.css - Inspired by Stone Island layout with Setsuna theme */

.store-test-page {
    /* Change this value to override the background color for this page only */
    background-color: #0b090a;
}

.store-test-page .store-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    display: block;
    /* Override default store centering */
}

/* Header bar for grid */
.store-grid-header {
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(243, 243, 243, 0.2);
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.refine-btn,
.sort-btn {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.refine-btn:hover,
.sort-btn:hover {
    opacity: 0.6;
}

/* Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-image-wrapper {
        aspect-ratio: 1 / 1.3;
        max-height: 200px;
    }

    .product-card {
        margin-bottom: 10px;
    }

    .product-name {
        font-size: 0.6rem;
    }

    .product-price {
        font-size: 0.75em;
    }
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

.product-image-wrapper {
    background-color: #0b090a;
    /* Light grey background for products as in screenshot */
    aspect-ratio: 1 / 1.3;
    overflow: hidden;
    margin-bottom: 15px;
    display: block;
    /* changed from flex */
    position: relative;
    /* For absolute positioning of image */
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;

    /* Framing Support */
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 50% 50%;
    /* Explicit origin */

    /* Default variables if not set inline */
    --scale: 1;
    --off-x: 0%;
    --off-y: 0%;

    /* Apply framing: Translate first (position), then Scale */
    transform: translate(calc(-50% + var(--off-x)), calc(-50% + var(--off-y))) scale(var(--scale));
}

.product-card:hover .product-image {
    /* Hover effect: Scale up by 5% relative to the current framing scale */
    /* User requested removal of hover zoom */
    /* transform: translate(calc(-50% + var(--off-x)), calc(-50% + var(--off-y))) scale(calc(var(--scale) * 1.05)); */
}

.product-info {
    color: #f3f3f3;
    text-transform: lowercase;
}

.product-id {
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.product-name {
    font-family: 'Hiragino Kaku Gothic Std W8', 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.2;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.product-desc {
    font-size: 12px;
    margin-bottom: 10px;
    opacity: 0.7;
    height: 3em;
    overflow: hidden;
}

.product-price {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Link wrapper reset */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* .product-card-link:hover .product-card .product-image {
    transform: scale(1.05);
} */