/* STORE PAGE */

#store-items {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-auto-rows: 280px;
}

.store-item-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.store-item {
    --padding: 8px;
    --expand: 5px;
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--colour-grey);
    border-radius: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 100ms ease-in-out;
    overflow: hidden;
    background-color: var(--colour-black);
    top: 0;
    left: 0;
}
.store-item:hover {
    position: absolute;
    border: 1px solid var(--colour-blue);
    height: calc(100% + 70px + 2 * var(--expand));
    width: calc(100% + 2 * var(--expand));
    z-index: 100;
    top: calc(-1 * var(--expand));
    left: calc(-1 * var(--expand));
}
.store-item.discount::after {
    content: 'SALE!';
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--colour-red);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
}
.store-item > *:not(.store-item-image) {
    margin-left: var(--padding);
    margin-right: var(--padding);
    transition: all 100ms ease-in-out;
}
.store-item:hover > *:not(.store-item-image) {
    margin-left: calc(var(--padding) + var(--expand));
    margin-right: calc(var(--padding) + var(--expand));
}
.store-item:hover > .store-item-image {
    height: calc(200px + var(--expand));
}

.store-item-title {
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.store-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    margin-left: 0;
    transition: all 100ms ease-in-out;
}

.store-item-price {
    font-size: 24px;
    flex-shrink: 0;
}

.store-item-buttons {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    margin-top: 8px;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(10px, 2vw, 14px);
}
.store-item:hover .store-item-buttons {
    display: grid;
}

.store-item-more-details {
    text-decoration: underline;
    text-align: center;
    grid-column: span 2;
}

/* PRODUCT */

/* CHECKOUT */

#progress {
    display: flex;
    gap: 160px;
    margin: 0 auto;
    justify-content: center;
    margin-bottom: 48px;
}

.progress-section {
    --size: 36px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.progress-section-text {
    text-align: center;
    white-space: nowrap;
}

.progress-section-number {
    width: var(--size);
    height: var(--size);
    border-radius: var(--size);
    position: relative;
    border: 3px solid var(--colour-blue);
    background-color: var(--colour-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 300ms ease 500ms, border-color 300ms ease;
}
.progress-section.complete .progress-section-number {
    border: 3px solid var(--colour-green);
}
.progress-section.complete + :not(.progress-section.complete) .progress-section-number,
.progress-section:first-child:not(.progress-section.complete) .progress-section-number {
    background-color: var(--colour-blue);
}
.progress-section.complete + :not(.progress-section.complete) .progress-section-text,
.progress-section:first-child:not(.progress-section.complete) .progress-section-text {
    font-weight: 600;
}

.progress-section-text {
    content: attr(data-content);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    translate: -50% 0;
}

.progress-section-number i {
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    font-size: var(--size);
    color: var(--colour-green);
    background-color: white;
    transition: opacity 300ms ease;
}
.progress-section.complete .progress-section-number i {
    opacity: 1;
}

.progress-section-bar {
    position: absolute;
    width: calc(160px + var(--size));
    height: 4px;
    background-color: var(--colour-dblue);
    top: 50%;
    left: 50%;
    translate: 0 -50%;
}

.progress-section-bar::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 100%;
    background-color: var(--colour-blue);
    top: 0;
    left: 0;
    transition: width 700ms ease-in-out 300ms;
    background-color: var(--colour-green);
}
.progress-section.complete .progress-section-bar::after {
    width: 100%;
}

#basket-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    min-height: 400px;
    border: 1px solid var(--colour-dblue);
    border-radius: 8px;
    padding: 16px;
}

#basket {
    flex-grow: 1;
    border-right: 1px solid var(--colour-dblue);
    padding-right: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 500px;
    overflow-x: hidden;
    overflow-y: auto;
}

#navigation {
    margin-top: 8px;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#basket-right {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#section-content {
    flex-grow: 1;
}

#basket-total {
    background-color: red;
    width: 100%;
    height: 40%;
}