.open-btn {
  padding: 12px 24px;
  background: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;

  &:hover {
    background: #40a9ff;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;

  &.active {
    display: block;
  }
}

.drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  transition: right 0.3s ease;
  z-index: 1001;
  overflow-y: auto;

  &.active {
    right: 0;
  }
}

.cart-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cart-header {
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 0px 30px 0px;

  .cart-title {
    font-size: 22px;
    color: #333;
    font-weight: 500;
    margin-bottom: 15px;
  }
  .cart-total {
    font-size: 15px;
    color: #ff0000;
    margin-bottom: 15px;
    .total-price {
      font-size: 25px;
      font-weight: 500;
      margin-left: 4px;
    }
  }
  .btn-submit {
    width: 150px;
    height: 44px;
    background: #c92910;
    border-radius: 10px 10px 10px 10px;
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 15px;
    &:hover {
      background: #f53431;
    }
  }

  .btn-cart {
    width: 150px;
    height: 44px;
    background: white;
    color: #c92910;
    border: 1px solid #c92910;
    border-radius: 10px 10px 10px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;

    &:hover {
      background: #fff1f0;
    }
  }

  .close-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s;

    &:hover {
      color: #333;
    }
  }
}

.cart-actions {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.select-all {
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;

  label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;

    .checkbox {
      margin-right: 8px;
      width: 18px;
      height: 18px;
    }
  }
}

.cart-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px;
}

.store-section {
  margin-top: 16px;

  &:first-child {
    margin-top: 0;
  }

  .store-header {
    padding: 14px 0;
    background: #f7f7f7;
    label {
      display: flex;
      align-items: center;
      cursor: pointer;
      font-size: 13px;
      color: #333;
      margin-bottom: 0px !important;

      .checkbox {
        margin-right: 14px;
        width: 18px;
        height: 18px;
      }

      .store-icon {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        margin-right: 9px;
      }

      .store-name {
        font-size: 13px;
      }
    }
  }
}

.cart-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* padding: 12px 0; */
  /* border-bottom: 1px solid #f5f5f5; */
  padding-left: 20px;
  margin-top: 15px;

  .item-checkbox {
    width: 160px;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 1px solid #d1d1d1;
    .checkbox {
      position: absolute;
      top: 10px;
      left: 10px;
      width: 18px;
      height: 18px;
    }
    .product-image {
      width: 160px;
      height: 160px;
      object-fit: cover;
    }
  }

  .item-price {
    width: 160px;
    text-align: center;
    font-size: 18px;
    color: #333;
    margin: 15px 0px;
    .price {
      color: #333;
    }
  }

  .quantity-control {
    width: 120px;
    height: 35px;
    display: flex;
    align-items: center;
    border: 1px solid #eedcdc;
    border-radius: 5px;
    overflow: hidden;
    .qty-btn {
      width: 35px;
      height: 35px;
      background: #f8f2f2;
      color: #333;
      border: none;
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s;
      &:hover {
        background: #fbeded;
      }
      &:disabled {
        cursor: not-allowed;
        opacity: 0.5;
        &:hover {
          color: #666;
        }
      }
    }

    .qty-input {
      width: 50px;
      height: 35px;
      text-align: center;
      font-size: 16px;
      padding: 0 4px;
      border: none;
      &:focus {
        outline: none;
      }
    }
  }
}

.checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #ff4d4f;
}

@media (max-width: 768px) {
  .drawer {
    width: 100%;
    max-width: 340px;
    right: -100%;
  }
}
