.product-container {
    max-width: 1150px;   /* +50% from the last size */
    margin: 40px auto;
    padding: 20px;
}

.product-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
}

.product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.product-content {
    display: flex;
    gap: 40px;
    align-items: stretch;   /* ensure right column's border stretches full height */
}

.product-left {
    flex: 1.5;
    min-width: 0;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-title {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    text-align: left;
    line-height: 1.05;
}

.product-right {
    flex: 1.5;
    min-width: 0;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 3px solid var(--color-text-strong);
    box-sizing: border-box;
    justify-content: flex-start;
}

/* image sizing: fill left column width but keep aspect */
.product-image img {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    display: block;
}

.product-image {
    flex: 1 1 auto;
    width: 100%;
    max-width: 420px;
    min-width: 0;
}

.product-image video {
    display: block;
    width: 100%;
    max-width: 420px;
    max-height: 50vh;
    border-radius: 8px;
    background: var(--color-text-strong);
    box-shadow: var(--shadow-soft);
}

.gallery-empty {
    padding: 40px 12px;
    color: var(--color-text-muted);
    text-align: center;
}

.product-image .gallery-media[hidden] {
    display: none;
}

.gallery-arrow {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    font-size: 1.5rem;
    cursor: pointer;
}

.gallery-arrow:hover {
    background: var(--color-primary-hover);
}

.gallery-arrow[hidden],
.gallery-counter:empty {
    display: none;
}

.gallery-counter {
    text-align: center;
    color: var(--color-text-muted);
}

.product-info {
    flex: 1;
}

.product-description {
    font-size: 1.5em;
    color: var(--color-primary);
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#qty_input {
    background-color: var(--color-page-background);
    text-align: center;
    width: 60px;
    height: 30px;
    padding: 5px;
    border-radius: 5px;
    margin-top: 420px;
}

#out_of_stock_text {
    color: var(--color-error);
    font-size: 1.5em;
    margin-left: 40px;
    margin-top: 420px;
}

.product-right form {
    margin-top: 10px;
}

.product-right form button {
    background-color: var(--color-primary);
    color: var(--color-primary-contrast);
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
    margin-left: 80px;
    margin-top: 420px;
}

.product-right form button:hover {
    background-color: var(--color-primary-hover);
}

/* responsive: stack on small screens and change the divider to a top border */
@media (max-width: 800px) {
    .product-content {
        flex-direction: column;
        gap: 10px;
    }

    .product-right {
        border-left: none;
        border-top: 1px solid var(--color-text-strong);
        padding-left: 0;
        padding-top: 20px;
    }

    .product-title {
        text-align: center;
        font-size: 2rem;
    }
}