/*
 * Styles for the Hardware Product Viewer Components
 */

/* Generic Hardware Styles */
.hardware-product-view,
.handy-product-view,
.laptop-product-view,
.feature-product-view {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: var(--wp--preset--font-family--system-font);
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    background-color: var(--wp--preset--color--base);
}

@media (min-width: 768px) {
    .hardware-product-view,
    .handy-product-view,
    .laptop-product-view,
    .feature-product-view {
        grid-template-columns: 1fr 1fr;
    }
}

.hardware-product-view .product-preview-area,
.handy-product-view .product-preview-area,
.laptop-product-view .product-preview-area,
.feature-product-view .product-preview-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hardware-product-view .product-preview-image-container {
    width: 100%;
    background-color: var(--wp--preset--color--base-2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--contrast-2);
}

/* Aspect Ratios */
.handy-product-view .product-preview-image-container,
.feature-product-view .product-preview-image-container {
    padding-top: 100%; /* 1:1 ratio */
}
.laptop-product-view .product-preview-image-container {
    padding-top: 75%; /* 4:3 ratio */
}


.hardware-product-view .product-preview-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease-in-out;
}

.hardware-product-view .product-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.hardware-product-view .thumbnail-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--wp--preset--color--contrast-2);
    transition: border-color 0.2s;
}

.hardware-product-view .thumbnail-image:hover {
    border-color: var(--wp--preset--color--contrast-3);
}

.hardware-product-view .product-details-area {
    display: flex;
    flex-direction: column;
}

.hardware-product-view .product-details-area h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--wp--preset--color--contrast);
}

.hardware-product-view .product-taxonomy {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--wp--preset--color--contrast);
}

.hardware-product-view .product-taxonomy span {
    background-color: var(--wp--preset--color--base-2);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.hardware-product-view .storage-selector-section h3,
.hardware-product-view .color-selector-section h3 {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 10px;
    border-top: 1px solid var(--wp--preset--color--contrast-2);
    padding-top: 20px;
    color: var(--wp--preset--color--contrast);
}

.hardware-product-view .storage-selector-buttons,
.hardware-product-view .color-selector-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hardware-product-view .storage-selector-btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: 2px solid var(--wp--preset--color--contrast-2);
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hardware-product-view .storage-selector-btn:hover {
    border-color: var(--wp--preset--color--primary);
}

.hardware-product-view .storage-selector-btn.active {
    border-color: var(--wp--preset--color--primary);
    background-color: var(--wp--preset--color--base-2);
    font-weight: bold;
    box-shadow: 0 0 0 2px var(--wp--preset--color--primary);
}

.hardware-product-view .color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--wp--preset--color--contrast-2);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.hardware-product-view .color-swatch:hover {
    border-color: var(--wp--preset--color--primary);
}

.hardware-product-view .color-swatch.active {
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 2px var(--wp--preset--color--primary);
}
