* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

main {
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
    max-width: 1200px;
    margin: 60px auto;
}

h1 {
    font-size: 28px;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    transition: color 0.2s;
}

nav a:hover {
    color: #000;
}

nav a.active {
    color: #000;
    font-weight: 600;
}

.cart-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 30px;
}

.cart-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.50);
    display: flex;
    gap: 20px;
}

.item-image {
    width: 70px;
    height: 70px;
    border: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* ✅ ensures image stays inside */
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ✅ keeps proper ratio without stretching */
    display: block;
}

.item-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.item-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.item-size {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    /*overflow: hidden;*/
}

.close-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #ff4757;
  color: white;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #ff3742;
  transform: scale(1.1);
}

.close-btn:active {
  transform: scale(0.95);
}
.quantity-btn {
    background-color: #f8f8f8;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: #eee;
}

.quantity-display {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 14px;
    background: white;
}

.remove-btn {
    color: #ff3b30;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.item-price {
    font-size: 18px;
    font-weight: 600;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-bottom: 5px;
}

.sale-price {
    color: #000;
}

.summary {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-total {
    font-weight: 600;
    font-size: 18px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    margin-top: 10px;
}

.checkout-btn {
    background-color: #000;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.checkout-btn:hover {
    background-color: #333;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-cart h2 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 500;
}

.empty-cart p {
    font-size: 16px;
    margin-bottom: 30px;
}

.shop-btn {
    background-color: #000;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}


.cart-wrapper {
    position: fixed;
    top: 40px;
    right: 0;
    width: 392px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 999;
    padding: 20px;
    display: none;
    transition: transform 0.3s ease-in-out;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
}

.item-info h4 {
    margin: 0;
    font-size: 14px;
}

.summary {
    margin-top: 20px;
}


@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
    }
    
    .item-image {
        width: 100%;
        height: 200px;
    }
    
    .item-price {
        text-align: left;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        width: 100%;
        justify-content: center;
    }
}