button{
    border-radius: 5px;
    justify-content: center;
    border: white solid 2px;
    font-family: MyFont;
    width: 200px;
    height: 40px;
    font-size: 18px;
    position: absolute;
    left: 10px;
    background-color: #6236d9;
    color: #ffffff;
}
.product-button{
    border-radius: 5px;
    justify-content: center;
    border: white solid 2px;
    font-family: MyFont;
    width: 200px;
    height: 40px;
    font-size: 18px;
    position: absolute;
    right: 20px;
    background-color: #6236d9;
    color: #ffffff;
    #iiii{
        position: absolute;
        right: 15px;
        top: 10px;
    }
}
.items {
    width: 320px;
    height: 290px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px #7f7fb2ff;
    transition: 1s;
    position: relative;
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
}
.items:hover {
    transform: scale(1.05);
    background-color: rgb(127 127 178 / 0.15);
    box-shadow: 0 5px 25px #7f7fb2;
    cursor: pointer;
}
.second_content,
.third_content{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px auto;
    max-width: 1750px;
}
.second_items {
    flex: 3;
    height: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px #7f7fb2ff;
    transition: 1s;
    overflow-y: auto;
}

.second_items2 {
    flex: 1;
    height: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px #7f7fb2ff;
    transition: 1s;
    position: relative;
    padding-bottom: 25px;
}
.second_items:hover,
.second_items2:hover {
    transform: scale(1.02);
    background-color: rgb(127 127 178 / 0.15);
    box-shadow: 0 5px 25px #7f7fb2;
    cursor: pointer;
}
.summary-columns {
    display: flex;
    justify-content: space-between;
    direction: rtl;
    margin: 25px 25px 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgb(98 54 217 / 0.2);
}
.summary-labels,
.summary-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.summary-labels {
    font-size: 18px;
    color: #77778a;
}
.summary-values {
    align-items: flex-end;
    color: #1f1f2e;
    font-family: Arial, sans-serif;
}
.labels,
.values {
    margin: 0;
    font-family: MyFont;
}
.payable-value {
    color: #6236d9;
    font-weight: bold;
}
.checkout-button{
    background-color: #6236d9;
    position: static !important;
    display: block;
    margin: 22px auto 0;
    border: none;
    transition: 0.25s;
}
.checkout-button:hover {
    background-color: #4f28ba;
    transform: translateY(-2px);
}
.cart-product {
    display: grid;
    grid-template-columns: 58px minmax(150px, 1.4fr) auto minmax(130px, 1fr) 36px;
    align-items: center;
    gap: 16px;
    margin: 0 24px;
    padding: 16px 0;
    border-bottom: 1px solid rgb(98 54 217 / 0.16);
    direction: rtl;
}
.cart-product-image {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background-color: rgb(98 54 217 / 0.12);
    color: #6236d9;
    font-size: 23px;
}
.cart-product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cart-product-info span {
    color: #77778a;
    font-size: 14px;
}
.cart-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
}
.cart-quantity button,
.remove-cart,
.discount-box button {
    position: static;
    width: auto;
    height: auto;
}
.cart-quantity button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgb(98 54 217 / 0.3);
    background: #ffffff;
    color: #6236d9;
}
.cart-product-price {
    color: #6236d9;
    font-family: MyFont;
    text-align: left;
}
.remove-cart {
    padding: 7px;
    border: none;
    background: transparent;
    color: #b84a4a;
    font-size: 17px;
}
.discount-box {
    display: flex;
    margin: 20px 25px 0;
}
.discount-box input {
    min-width: 0;
    flex: 1;
    padding: 10px 12px;
    border: 1px solid rgb(98 54 217 / 0.3);
    border-radius: 0 7px 7px 0;
    outline: none;
    font-family: MyFont;
}
.discount-box input:focus { border-color: #6236d9; }
.discount-box button {
    padding: 0 15px;
    border: none;
    border-radius: 7px 0 0 7px;
}
@media (max-width: 850px) {
    .third_content { flex-direction: column; }
    .second_items,
    .second_items2 { width: 100%; flex: none; }
    .cart-product { grid-template-columns: 52px 1fr auto; }
    .cart-product-price { grid-column: 2; text-align: right; }
    .remove-cart { grid-column: 3; grid-row: 1; }
}

@media (max-width: 560px) {
    .second_items,
    .second_items2 { height: auto; min-height: 360px; }
    h2 { font-size: 26px; }
    .cart-product {
        grid-template-columns: 45px 1fr auto;
        gap: 10px;
        margin-inline: 12px;
    }
    .cart-product-image { width: 44px; height: 44px; }
    .cart-product-price { font-size: 14px; }
    .summary-columns,
    .discount-box { margin-inline: 16px; }
}
h2{
    margin: 15px 25px 0px 15px;
    font-size: 35px;
    color: #6236d9;
    border-bottom: 2px solid #000000;
}
.search_input{
    border-radius: 5px;
    display: flex;
    justify-content: left;
    margin: 10px;
    border: #6236d9;
    font-family: MyFont;
    width: 200px;
    height: 40px;
    border: none;
    outline: none;
    font-size: 18px;
    position: absolute;
    left: 10px;
    background-color: #ffffff;
    color: #6236d9;
}
#iii{
    position: absolute;
    left: 230px;
    bottom: 15px;
}
@keyframes fadeUp {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
.main_content h1 {
    animation: fadeUp 0.55s ease-out both;
}
.items,
.second_items,
.second_items2,
.items2 {
    opacity: 0;
    animation: fadeUp 0.6s ease-out forwards;
}
.second_content .items:nth-child(1) { animation-delay: 0.15s; }
.second_content .items:nth-child(2) { animation-delay: 0.25s; }
.second_content .items:nth-child(3) { animation-delay: 0.35s; }
.second_content .items:nth-child(4) { animation-delay: 0.45s; }

.third_content .second_items { animation-delay: 0.55s; }
.third_content .second_items2 { animation-delay: 0.65s; }

.fourth_content .items2:nth-child(1) { animation-delay: 0.75s; }
.fourth_content .items2:nth-child(2) { animation-delay: 0.75s; }
.fourth_content .items2:nth-child(3) { animation-delay: 0.75s; }
.fourth_content .items2:nth-child(4) { animation-delay: 0.75s; }

/* Responsive refinement - cart */
@media (max-width: 1000px) {
    .third_content {
        align-items: stretch;
        gap: 16px;
        margin-block: 18px;
    }

    .second_items {
        flex: 2;
    }

    .second_items2 {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 780px) {
    .third_content {
        flex-direction: column;
    }

    .second_items,
    .second_items2 {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .second_items {
        height: auto;
        max-height: 520px;
    }

    .second_items2 {
        height: auto;
        min-height: 330px;
    }
}

@media (max-width: 560px) {
    .third_content {
        gap: 12px;
        margin-block: 12px;
    }

    h2 {
        margin: 12px 14px 5px;
        font-size: 25px;
    }

    .cart-product {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        gap: 8px;
        margin-inline: 12px;
        padding-block: 13px;
    }

    .cart-product-info {
        min-width: 0;
    }

    .cart-product-info strong,
    .cart-product-info span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cart-quantity {
        grid-column: 2;
        justify-self: start;
    }

    .cart-product-price {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .remove-cart {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
    }

    .summary-columns {
        margin: 18px 16px 12px;
    }

    .summary-labels,
    .summary-values {
        gap: 16px;
        font-size: 15px;
    }

    .discount-box {
        margin: 16px 16px 0;
    }

    .checkout-button {
        width: calc(100% - 32px);
        min-height: 44px;
    }
}

@media (hover: none) {
    .items:hover,
    .second_items:hover,
    .second_items2:hover,
    .checkout-button:hover {
        transform: none;
    }
}
