main {
    min-height: 100dvh;
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3em;

    padding: 3em;
}

main .product-images {
    position: relative;

    width: 100%;
    aspect-ratio: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    --padding: 5em;
    padding: var(--padding);

    background-image: linear-gradient(var(--bg-light), var(--bg));

    box-shadow: inset 0 2px 2px var(--highlight), 0 -2px 2px var(--border);
    border-radius: 5em;
}

main .product-images img {
    position: absolute;
    max-width: calc(100% - var(--padding));
    max-height: calc(100% - var(--padding));

    opacity: 0;

    transition: opacity 0.5s;
}

main .product-images img.active {
    opacity: 1;
}

main .product-images-interface {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 1em;
}

main .product-images-interface button {
    background-color: transparent;

    border: none;

    cursor: pointer;
}

main .product-images-interface button svg {
    width: 4em;
    height: 4em;

    transition: translate 0.25s, fill 0.25s;
}

main .product-images-interface button:hover svg {
    translate: -1em 0;

    fill: var(--text);
}

main .product-images-interface button#product-forwards:hover svg {
    translate: 1em 0;
}

main .product-images-interface .image-number {
    height: 100%;

    display: flex;
    align-items: end;
    gap: 0.75em;

    padding: 1em 0;
}

main .product-images-interface .image-number .image-number-dot {
    height: 1em;
    aspect-ratio: 1;

    border-radius: 9999px;

    background-color: var(--text-muted);

    transition: scale 0.5s, background-color 0.5s;
}

main .product-images-interface .image-number .image-number-dot.active {
    scale: 1.1;

    background-color: var(--text);
}

main .product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

main .product-info .product-title {
    margin-bottom: 1em;

    color: var(--primary);

    font-size: 4em;

    font-family: "Archivo Black", sans-serif;
}

main .product-info .product-price {
    width: fit-content;

    padding: 0.5em 1.25em;

    background-image: linear-gradient(var(--bg-light), var(--bg));
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    border-radius: 9999px;
}

main .product-info .product-price p {
    color: var(--text-muted);
}

main .product-info .product-price p span {
    margin-left: 0.3em;

    font-size: 2.5em;

    color: var(--text-muted);

    text-decoration: line-through;
}

main .product-info .product-price p span.new-price {
    margin-left: 0.1em;

    color: var(--text);

    text-decoration: none;
}

main .product-info .product-delivery {
    width: fit-content;

    display: flex;
    align-items: center;
    gap: 1em;

    padding: 0.5em 1.25em;

    background-image: linear-gradient(var(--bg-light), var(--bg));
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    border-radius: 9999px;
}

main .product-info .product-delivery .green-dot {
    height: 1em;
    aspect-ratio: 1;

    background-color: var(--success);

    border-radius: 9999px;
}

main .product-info .product-description {
    display: flex;
    flex-direction: column;
    gap: 0.9em;

    padding: 1.25em;

    background-image: linear-gradient(var(--bg-light), var(--bg));
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    border-radius: 1.5em;
}

main .product-info .product-description h4 {
    margin-bottom: 0.75em;

    color: var(--success);

    font-size: 1.5em;
    font-weight: 700;
}

main .product-info .product-description h4.no-stock {
    color: var(--warning);
}

main .product-info .product-description p {
    font-weight: 400;

    font-size: 0.9em;

    line-height: 1.5em;
}

main .product-info .product-description select {
    width: fit-content;

    margin-top: 1em;

    padding: 0.5em 1em;

    background-color: var(--border);

    border: none;
    border-radius: 1em;
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    outline: none;
}

main .product-info .product-description select option {
    display: none;
}

main .product-info button {
    position: relative;

    padding: 0.5em;

    color: var(--secondary);

    font-size: 2em;

    text-transform: uppercase;

    background-color: transparent;

    border: 1px solid var(--secondary);
    border-radius: 9999px;

    overflow: hidden;

    cursor: pointer;

    transition: color 0.25s;
}

main .product-info button:hover {
    color: var(--text);
}

main .product-info button::before {
    content: "";

    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;

    background-color: var(--secondary);

    z-index: -1;

    transition: height 0.25s;
}

main .product-info button:hover::before {
    height: 100%;
}

main .product-info .product-error-msg {
    color: var(--danger);

    font-size: 1.25em;
}

section {
    min-height: 100dvh;
    width: 100%;

    flex-direction: column;
    gap: 3em;

    padding: 3em;
}

section button#back-main {
    width: fit-content;

    display: flex;
    align-items: center;
    gap: 0.5em;

    padding: 0.5em 1em;

    color: var(--secondary);

    font-size: 1.25em;

    background-color: transparent;

    border: 1px solid var(--secondary);
    border-radius: 9999px;

    cursor: pointer;

    transition: color 0.25s, background-color 0.25s;
}

section button#back-main:hover {
    color: var(--text);

    background-color: var(--secondary);
}

section button#back-main svg {
    transition: fill 0.25s;
}

section button#back-main:hover svg {
    fill: var(--text);
}

section h3 {
    color: var(--primary);

    font-size: 3em;

    font-family: "Archivo Black", sans-serif;
}

section .order-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3em;
}

section .order-overview .address-details {
    display: flex;
    flex-direction: column;
    gap: 2em;

    padding: 2em;

    background-image: linear-gradient(var(--bg-light), var(--bg));
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    border-radius: 1.5em;
}

section .order-overview .address-details .address-group {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

section .order-overview .address-details .address-group-row {
    display: flex;
    gap: 2em;
}

section .order-overview .address-details .address-group-row .address-group {
    flex: 1;
}

section .order-overview .address-details .address-group label {
    font-size: 1.25em;
}

section .order-overview .address-details .address-group select {
    width: 100%;
    font-size: 1em;
}

section .order-overview .address-details .address-group input {
    width: auto;

    padding: 0.5em 1em;

    background-color: var(--border);

    border: none;
    border-radius: 1em;
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    outline: none;
}

section .order-overview .address-details .address-group select {
    padding: 0.5em 1em;

    background-color: var(--border);

    border: none;
    border-radius: 1em;
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    outline: none;
}

section .order-overview .order-payment {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 3em;
}

section .order-overview .order-payment .order-price {
    display: flex;
    flex-direction: column;
    gap: 1em;

    padding: 2em;

    background-image: linear-gradient(var(--bg-light), var(--bg));
    box-shadow: inset 0 1px 2px var(--highlight), 0 -1px 2px var(--border);

    border-radius: 1.5em;
}

section .order-overview .order-payment .order-price .order-price-row {
    display: flex;
    justify-content: space-between;
    gap: 1em;
}

section .order-overview .order-payment .order-price .order-price-row p.muted {
    color: var(--text-muted);
}

section .order-overview .order-payment .order-price .order-price-row.total {
    margin-top: 1em;

    font-size: 1.75em;
    font-weight: 700;
}

section .order-overview .order-payment button#create-order {
    position: relative;

    width: 100%;
    padding: 0.5em;

    color: var(--secondary);

    font-size: 2em;

    text-transform: uppercase;

    background-color: transparent;

    border: 1px solid var(--secondary);
    border-radius: 9999px;

    overflow: hidden;

    cursor: pointer;

    transition: color 0.25s;
}

section .order-overview .order-payment button#create-order:hover {
    color: var(--text);
}

section .order-overview .order-payment button#create-order::after {
    content: "";

    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;

    background-color: var(--secondary);

    z-index: -1;

    transition: height 0.25s;
}

section .order-overview .order-payment button#create-order:hover::after {
    height: 100%;
}

section .order-overview .order-payment p.order-error-msg {
    color: var(--danger);

    font-size: 1.25em;
}

@media (max-width: 1100px) {
    main .product-images {
        aspect-ratio: unset;
        height: 100dvh;
    }

    section .order-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    main {
        font-size: 0.8rem;
    }
}

@media (max-width: 800px) {
    main {
        grid-template-columns: 1fr;

        font-size: 1rem;
    }

    main .product-images {
        aspect-ratio: 1;
        height: unset;

        --padding: 10em;
    }

    main .product-images-container {
        order: 2;
    }

    main .product-info {
        order: 1;
    }
}

@media (max-width: 675px) {
    section .order-overview {
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    section .order-overview .address-details .address-group-row {
        flex-direction: column;
    }

    footer {
        font-size: 0.6rem;
    }
}

@media (max-width: 450px) {
    main {
        font-size: 0.85rem;
    }

    section .order-overview {
        font-size: 0.75rem;
    }
}