* { margin:0; padding:0; box-sizing:border-box; }

:root {
    --smoky-black:#11120D;
    --olive-drab:#565449;
    --bone:#D8CFBC;
    --floral-white:#FFFBF4;
}

body {
    font-family:"Inter", sans-serif;
    background-color:var(--floral-white);
    color:var(--smoky-black);
    display:flex;
    flex-direction:column;
    min-height:100vh;
    position:relative;
}


.side-logo {
    width:60px;
    height:60px;
    object-fit:contain;
}

h1, h2, h3 {
    font-family:"Playfair Display", serif;
}

.page-wrapper {
    flex:1;
    display:flex;
    flex-direction:column;
    min-height:100vh;
    transition:all 0.3s ease;
}

header {
    background-color:var(--bone);
    padding:1rem 1.5rem;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    border-bottom: 1px solid var(--smoky-black);
    height: 100px;
}

header h1 {
    font-size:1.8rem;
}

header section{
    align-items: center;
    text-align: center;
    display: flex;
}

nav a {
    margin-left:1.5rem;
    text-decoration:none;
    color:var(--smoky-black);
    padding:5px;
    border-radius:5px;
}

nav a:hover {
    background-color:var(--floral-white);
}

.checkout-container {
    display:flex;
    gap:2rem;
    width:100%;
    padding:3rem 10rem;
    flex-wrap:wrap;
}

.cart-section,
.checkout-section {
    flex:1;
    background-color:var(--bone);
    padding:1rem;
    border-radius:12px;
    min-width:280px;
}

.cart-section h2,
.checkout-section h2 {
    margin-bottom:1rem;
}

.cart-item {
    display:flex;
    justify-content:space-between;
    align-items:center;
    background-color:var(--floral-white);
    padding:0.8rem;
    border-radius:10px;
    margin-bottom:0.8rem;
}

.cart-item img {
    width:60px;
    height:60px;
    object-fit:cover;
    border-radius:6px;
    margin-right:0.8rem;
}

.quantity-control {
    display:flex;
    align-items:center;
    gap:10px;
}

.quantity-control .quantity {
    width: 40px;           
    text-align: center;
    display: inline-block;
}

.quantity-control button {
    width:28px;
    height:28px;
    border:none;
    background-color:var(--olive-drab);
    color:white;
    border-radius:6px;
    cursor:pointer;
    font-weight:bold;
}

.checkout-section input {
    width:100%;
    padding:0.5rem 0.7rem;
    margin-bottom:0.6rem;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:0.9rem;
}

.form-row {
    display:flex;
    gap:0.6rem;
    flex-wrap:wrap;
}

.form-row input {
    flex:1;
    min-width:0;
}

.form-row-container {
    display:flex;
    flex-direction:column;
    width:100%;
}

.order-summary {
    display: flex;
    flex-direction: column;
    gap:8px;
    background:#e6e2d9;
    padding:0.8rem;
    border-radius:8px;
    margin-top:0.8rem;
}

.checkout-btn {
    margin-top:0.8rem;
    padding:0.7rem;
    background-color:var(--olive-drab);
    color:white;
    border:none;
    border-radius:8px;
    font-weight:bold;
    cursor:pointer;
    width:100%;
}

footer {
    background-color:var(--floral-white);
    text-align:center;
    padding:1rem;
    font-size:0.85rem;
    margin-top:auto;
}

.modal {
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    justify-content:center;
    align-items:center;
    z-index:100;
}

.modal-content {
    background:#fff;
    padding:15px 1.8rem;
    border-radius:12px;
    display:flex;
    flex-direction:column;
    gap:15px;
    max-width:400px;
    width:90%;
    position:relative;
}

.modal-content input {
    width:100%;
    padding:0.5rem 0.7rem;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:0.9rem;
}

.modal-form-row {
    display:flex;
    gap:0.6rem;
}

.card-logos {
    display:flex;
    gap:0.5rem;
    margin-bottom:0.8rem;
    justify-content:center;
}

.card-logos img {
    height:28px;
}

.same-billing {
    display:flex;
    align-items:center;
    gap:0.5rem;
    margin:0.6rem 0;
    font-size:0.9rem;
}

.same-billing input {
    width:auto;
    margin:0;
    cursor:pointer;
}

.same-billing label {
    cursor:pointer;
}

.close-modal {
    position:absolute;
    top:15px;
    right:15px;
    font-size:22px;
    border:none;
    background:none;
    cursor:pointer;
    font-weight:bold;
    color:#333;
}

.close-modal:hover {
    color:red;
}

.error-msg {
    font-size:0.75rem;
    color:red;
    margin-top:0.2rem;
}

#paymentModal{
    gap: 20px;
}

@media (max-width:1024px) {
    .checkout-container {
        gap:1rem;
        padding:1rem 1.5rem;
    }
}

@media (max-width:768px) {
        header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        height: auto;
        text-align: center;
    }
    
    .checkout-container {
        flex-direction:column;
        padding:1rem;
    }

    .cart-section,
    .checkout-section {
        width:100%;
        min-width:unset;
    }

    .form-row {
        flex-direction:column;
    }

    .form-row input {
        width:100%;
    }

    .checkout-btn {
        padding:0.8rem;
    }
}

@media (max-width:480px) {
    .cart-item {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .cart-item img {
        margin-bottom:0.5rem;
    }

    .quantity-control {
        margin-top:0.5rem;
    }

    .checkout-section input {
        padding:0.6rem;
        font-size:0.9rem;
    }

    .order-summary {
        font-size:0.9rem;
        padding:0.6rem;
    }

    .checkout-btn {
        font-size:0.95rem;
        padding:0.7rem;
    }

    .modal-content {
        width:95%;
        padding:1.2rem;
    }

    .modal-form-row {
        flex-direction:column;
    }

    .modal-form-row input {
        width:100%;
    }

    .page-wrapper {
        margin-left:0;
        width:100%;
    }

    aside {
        position:relative;
        width:100%;
        height:auto;
        flex-direction:row;
        justify-content:center;
        padding:0.5rem 0;
    }

    header {
        flex-direction:column;
        align-items:center;
    }
}
