.prd-main-content {
    padding: 4rem 0;
}

.prd-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.prd-preview {
    text-align: center;
}

.prd-preview__image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.prd-preview__label {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.prd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.prd-product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    /* overflow: hidden; */ /* Removed to allow dropdown to overflow */
    display: flex;
    flex-direction: column;
}

.prd-product-card__image-container {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: #f0f0f0;
    overflow: hidden; /* Added to maintain rounded corners on image */
    border-radius: 8px 8px 0 0;
}

.prd-product-card__image,
.prd-product-card__portrait-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.prd-product-card__image {
    object-fit: cover;
    z-index: 1;
}

.prd-product-card__portrait-overlay {
    object-fit: contain; /* Use contain to fit the whole portrait */
    z-index: 2;
    padding: 20%; /* Adjust padding to make the portrait smaller than the product */
    transition: transform 0.3s ease;
}

.prd-product-card:hover .prd-product-card__portrait-overlay {
    transform: scale(1.05);
}

.prd-product-card__info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.prd-product-card__name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.prd-product-card__description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.prd-product-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Modal Styles */
.prd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.prd-modal__content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
}

.prd-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
}

.prd-modal__image {
    max-width: 100%;
    max-height: 60vh;
    margin: 1rem 0;
}

.prd-modal__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Custom Select Dropdown Styles */
.prd-variant-selector {
    margin-bottom: 1rem;
}

.prd-variant-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.prd-custom-select {
    position: relative;
    width: 100%;
}

.prd-custom-select__trigger {
    width: 100%;
    height: auto;
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.prd-custom-select__trigger:hover {
    border-color: var(--color-primary-light);
}

.prd-custom-select__trigger:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.prd-custom-select__options {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    padding: var(--space-xs) 0;
    list-style: none;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.prd-custom-select.open .prd-custom-select__options {
    display: block; /* Show when open */
}

.prd-custom-select.open-upward .prd-custom-select__options {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

.prd-custom-select__option {
    padding: var(--space-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.prd-custom-select__option:hover {
    background-color: #f1f3f5;
}

.prd-custom-select__option.is-selected {
    background-color: var(--color-primary);
    color: white;
    font-weight: var(--font-weight-bold);
}
