/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Reset */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Poppins',sans-serif;
    background:#0f172a;
    color:#ffffff;
    overflow-x:hidden;
}

/* Scrollbar */

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#111827;
}

::-webkit-scrollbar-thumb{
    background:#38bdf8;
    border-radius:10px;
}

::-webkit-scrollbar-thumb:hover{
    background:#0ea5e9;
}

::selection{
    background:#38bdf8;
    color:#fff;
}

/*=========================================
HEADER
=========================================*/

header{

    width:100%;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 8%;

    background:#111827;

    position:sticky;

    top:0;

    z-index:999;

    border-bottom:1px solid #1f2937;

}

/* Logo */

.logo{

    display:flex;

    align-items:center;

    gap:12px;

}

.logo img{

    width:55px;

    height:55px;

    object-fit:cover;

    border-radius:50%;

}

.logo h2{

    color:#38bdf8;

    font-size:28px;

    font-weight:700;

}
.logo a{

    color:white;

    text-decoration:none;

    padding:10px 16px;

    border-radius:8px;

    transition:.3s;

    font-weight:500;

}
/*=========================================
Navigation
=========================================*/

nav{

    display:flex;

    align-items:center;

    gap:18px;

}

nav a{

    color:white;

    text-decoration:none;

    padding:10px 16px;

    border-radius:8px;

    transition:.3s;

    font-weight:500;

}

nav a:hover{

    background:#38bdf8;

    color:#111827;

}

#user-status{

    color:#38bdf8;

    font-weight:600;

}

#logout-btn{

    border:none;

    padding:10px 16px;

    border-radius:8px;

    background:#ef4444;

    color:white;

    cursor:pointer;

    transition:.3s;

}

#logout-btn:hover{

    background:#dc2626;

}

/*=========================================
Cart
=========================================*/

.cart-icon{
    position:relative;
}

.cart-icon a{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    width:48px;
    height:48px;
    color:#fff;
    font-size:28px;
    text-decoration:none;
}

.cart-count{
    position:absolute;
    top:-6px;
    right:-6px;
    min-width:20px;
    height:20px;
    padding:0 5px;
    border-radius:50%;
    background:#ef4444;
    color:#fff;
    font-size:11px;
    font-weight:700;
    display:flex;
    justify-content:center;
    align-items:center;
    line-height:1;
}


/* ======================================== HERO SECTION ======================================== */ 
.hero{
    height: 80vh;
    background: linear-gradient(
        rgba(15,23,42,0.8),
        rgba(15,23,42,0.8)
    ),
    url("images/hero.jpg") center/cover no-repeat;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    text-align: center;
    padding: 20px;
}

.hero h1{

    font-size:58px;

    margin-bottom:20px;

    font-weight:700;

}

.hero p{

    font-size:22px;

    color:#d1d5db;

    margin-bottom:30px;

}

.hero button{

    padding:15px 35px;

    border:none;

    border-radius:40px;

    background:#38bdf8;

    color:#111827;

    font-size:18px;

    font-weight:600;

    cursor:pointer;

    transition:.3s;

}

.hero button:hover{

    transform:translateY(-4px);

    background:#0ea5e9;

}
/* ========================================
   CART CONTAINER
======================================== */

.cart-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #1e293b;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}


/* ========================================
   CART TITLE
======================================== */

.cart-container h1 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #38bdf8;
}


/* ========================================
   CART TABLE WRAPPER
======================================== */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}


/* ========================================
   TABLE HEADER
======================================== */

.cart-table thead {
    background: #0f172a;
}

.cart-table th {
    padding: 18px 15px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #38bdf8;
    border-bottom: 2px solid #334155;
}


/* ========================================
   TABLE BODY
======================================== */

.cart-table tbody tr {
    border-bottom: 1px solid #334155;
    transition: 0.3s ease;
}

.cart-table tbody tr:hover {
    background: #263449;
}

.cart-table td {
    padding: 18px 15px;
    text-align: center;
    vertical-align: middle;
    color: #e2e8f0;
    font-size: 14px;
}


/* ========================================
   PRODUCT IMAGE
======================================== */

.cart-table td img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    background: #ffffff;
    padding: 5px;
    display: block;
    margin: auto;
}


/* ========================================
   PRODUCT NAME
======================================== */

.cart-table td:nth-child(2) {
    font-weight: 600;
    color: #ffffff;
}


/* ========================================
   PRICE
======================================== */

.cart-table td:nth-child(3),
.cart-table td:nth-child(5) {
    color: #38bdf8;
    font-weight: 600;
}


/* ========================================
   QUANTITY AREA
======================================== */

.cart-table td:nth-child(4) {
    white-space: nowrap;
}


/* Quantity Buttons */

.cart-table td:nth-child(4) button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #38bdf8;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

.cart-table td:nth-child(4) button:hover {
    background: #0ea5e9;
    transform: scale(1.05);
}


/* Quantity Number */

.cart-table td:nth-child(4) span {
    display: inline-block;
    min-width: 35px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}


/* ========================================
   REMOVE BUTTON
======================================== */

.cart-table td:last-child button {
    padding: 9px 15px;
    border: none;
    border-radius: 6px;
    background: #ef4444;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.cart-table td:last-child button:hover {
    background: #dc2626;
    transform: translateY(-2px);
}


/* ========================================
   TABLE FOOTER
======================================== */

.cart-table tfoot {
    background: #0f172a;
}

.cart-table tfoot td {
    padding: 22px 15px;
    border-top: 2px solid #334155;
}


/* TOTAL */

#total {
    color: #38bdf8;
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}


/* ========================================
   EMPTY CART MESSAGE
======================================== */

.empty-cart {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
    font-size: 18px;
}





/* ========================================
   SMOOTH SCROLL
======================================== */

html {
    scroll-behavior: smooth;
}


/* ========================================
   SCROLLBAR
======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0ea5e9;
}

/*=========================================
FOOTER
=========================================*/

footer{
    background:#111827;
    text-align:center;
    padding:35px;
    margin-top:60px;
}

.footer-links{
    margin-bottom:18px;
}

.footer-links a{
    color:#fff;
    text-decoration:none;
    margin:0 15px;
}

.footer-links a:hover{
    color:#38bdf8;
}

footer p{
    color:#cbd5e1;
}


/*=========================================
Buttons
=========================================*/

button{

    transition:.3s;
cursor: pointer;
}

button:hover{

    transform:translateY(-2px);

}


.buy-btn {
    background: #22c55e;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
}


/* ========================================
   DELIVERY INFORMATION
======================================== */

.delivery-info {
    margin: 15px 0;
    padding: 15px;
    background: #1e293b;
    border-left: 4px solid #38bdf8;
    border-radius: 6px;
}

.delivery-info p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}


/* ========================================
   CART BUTTONS
======================================== */

.cart-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.cart-buttons a {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s ease;
}


/* CHECKOUT BUTTON */

.checkout-btn {
    background: #22c55e;
    color: white;
}

.checkout-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
}


/* CONTINUE SHOPPING BUTTON */

.continue-btn {
    background: #334155;
    color: white;
}

.continue-btn:hover {
    background: #475569;
    transform: translateY(-2px);
}

/*=========================================
LOADER
=========================================*/

.loader{
    width:60px;
    height:60px;
    border:6px solid #334155;
    border-top:6px solid #38bdf8;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin:100px auto;
}

@keyframes spin{
    100%{
        transform:rotate(360deg);
    }
}



/*=========================================
UTILITY CLASSES
=========================================*/

.text-center{
    text-align:center;
}

.mt-20{
    margin-top:20px;
}

.mt-40{
    margin-top:40px;
}

.mb-20{
    margin-bottom:20px;
}

.mb-40{
    margin-bottom:40px;
}

.hidden{
    display:none;
}

.flex{
    display:flex;
}

.space-between{
    justify-content:space-between;
}

.align-center{
    align-items:center;
}


/* ========================================
   EXTRA SMALL DEVICES
======================================== */

@media (max-width: 480px) {

    
   

    .cart-table {
        min-width: 650px;
    }

    .delivery-info {
        padding: 12px;
    }

    .delivery-info p {
        font-size: 13px;
    }

    #total {
        font-size: 17px;
    }
}


/* ===========================
   AMAZON STYLE MOBILE HEADER
=========================== */

header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    position:sticky;
    top:0;
    background:#111827;
    padding:15px 20px;
    z-index:999;
}

.menu-toggle{
    display:none;
    background:none;
    border:none;
    color:white;
    font-size:28px;
    cursor:pointer;
}

.cart-icon{
    position:relative;
}

.cart-icon a{
    color:white;
    font-size:28px;
    text-decoration:none;
}

.cart-count{
    position:absolute;
    top:-8px;
    right:-10px;
    min-width:20px;
    height:20px;
    background:#ef4444;
    color:#fff;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:11px;
    font-weight:bold;
}

/* Mobile */

@media(max-width:768px){

    .menu-toggle{
        display:block;
    }

    .logo{
        flex:1;
        justify-content:center;
    }

    .logo h2{
        font-size:22px;
    }

    .logo img{
        width:40px;
        height:40px;
    }

    nav{
        position:fixed;
        top:70px;
        left:-100%;
        width:260px;
        height:100vh;
        background:#111827;
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        padding:20px;
        transition:.35s ease;
        gap:5px;
        z-index:998;
    }

    nav.active{
        left:0;
    }

    nav a,
    #logout-btn{
        width:100%;
        padding:15px;
        text-align:left;
    }

    .cart-icon a{
        font-size:26px;
    }

     /* Cart */

    .cart-container {
        padding: 15px;
    }

    .cart-container h1 {
        font-size: 24px;
    }

    /* Enable horizontal scrolling */
    .cart-container {
        overflow-x: auto;
    }

    .cart-table {
        min-width: 700px;
    }

    .cart-table th,
    .cart-table td {
        padding: 12px;
        font-size: 13px;
    }

    .cart-table td img {
        width: 60px;
        height: 60px;
    }

    .cart-table td:nth-child(4) button {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    #total {
        font-size: 18px;
    }

    /* Buttons */

    .cart-buttons {
        flex-direction: column;
    }

    .cart-buttons a {
        width: 100%;
    }

    /* Footer */

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .footer-links a {
        margin: 0;
    }

    footer {
        padding: 25px 15px;
    }

    /* Images */

    img {
        max-width: 100%;
        height: auto;
    }
}
