/* Modern Theme Styling for Marketplace */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    background-color: #f8fafc;
}

/* Product Grid */
#root {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Product Box */
.box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

/* Image Container */
.img-box {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.images {
    max-width: 90%;
    max-height: 90%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

/* Product Info */
.bottom {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bottom p {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.bottom h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    margin: 0;
}

/* Add to Cart Button */
button {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3), 0 2px 4px -1px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4), 0 10px 10px -5px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3);
}

button:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(102, 126, 234, 0.5);
}

/* Cart Sidebar */
.sidebar {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.head {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.5rem;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.head p {
    margin: 0;
    color: white;
}

/* Cart Items */
#cartItem {
    padding: 1rem;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

#cartItem p {
    text-align: center;
    color: #64748b;
    padding: 2rem 0;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.cart-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.cart-item p {
    font-size: 0.875rem;
    color: #334155;
    font-weight: 500;
    margin: 0;
    flex: 1;
    margin-left: 0.75rem;
}

.cart-item h2 {
    font-size: 0.9375rem;
    color: #059669;
    font-weight: 700;
    margin: 0;
    margin-right: 0.75rem;
}

/* Row Image */
.row-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    flex-shrink: 0;
}

.rowimg {
    max-width: 43px;
    max-height: 43px;
    border-radius: 6px;
    object-fit: cover;
}

/* Trash Icon */
.fa-solid.fa-trash {
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.fa-solid.fa-trash:hover {
    color: #dc2626;
    background-color: #fee2e2;
}

/* Footer */
.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 0 0;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
}

.foot h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.foot h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #root {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .box {
        padding: 1rem;
    }
    
    .img-box {
        height: 150px;
    }
}
